Skip to content

Commit

Permalink
load_test - rename generated load test so we can handwrite enhancem…
Browse files Browse the repository at this point in the history
…ents in (#25655)
  • Loading branch information
mbfrahry authored Apr 22, 2024
1 parent ffc98de commit e39139b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package loadtestservice

// NOTE: this file is generated - manual changes will be overwritten.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
import (
Expand Down Expand Up @@ -190,12 +189,14 @@ func (r LoadTestResource) Update() sdk.ResourceFunc {
}
}

// nolint unparam
func (r LoadTestResource) mapLoadTestResourceSchemaToLoadTestProperties(input LoadTestResourceSchema, output *loadtests.LoadTestProperties) error {

output.Description = &input.Description
return nil
}

// nolint unparam
func (r LoadTestResource) mapLoadTestPropertiesToLoadTestResourceSchema(input loadtests.LoadTestProperties, output *LoadTestResourceSchema) error {
output.DataPlaneURI = pointer.From(input.DataPlaneURI)
output.Description = pointer.From(input.Description)
Expand Down Expand Up @@ -256,6 +257,7 @@ func (r LoadTestResource) mapLoadTestResourceSchemaToLoadTestResourceUpdate(inpu
return nil
}

// nolint: unused
func (r LoadTestResource) mapLoadTestResourceUpdateToLoadTestResourceSchema(input loadtests.LoadTestResourceUpdate, output *LoadTestResourceSchema) error {

identity, err := identity.FlattenLegacySystemAndUserAssignedMapToModel(input.Identity)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package loadtestservice_test

// NOTE: this file is generated - manual changes will be overwritten.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.
import (
Expand Down
16 changes: 9 additions & 7 deletions internal/services/loadtestservice/registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,28 @@ import (

var _ sdk.TypedServiceRegistrationWithAGitHubLabel = Registration{}

type Registration struct {
autoRegistration
}
type Registration struct{}

func (r Registration) AssociatedGitHubLabel() string {
return "service/load-test"
}

func (r Registration) WebsiteCategories() []string {
return r.autoRegistration.WebsiteCategories()
return []string{
"Load Test",
}
}

func (r Registration) Name() string {
return r.autoRegistration.Name()
return "LoadTestService"
}

func (r Registration) DataSources() []sdk.DataSource {
return r.autoRegistration.DataSources()
return []sdk.DataSource{}
}

func (r Registration) Resources() []sdk.Resource {
return r.autoRegistration.Resources()
return []sdk.Resource{
LoadTestResource{},
}
}
30 changes: 0 additions & 30 deletions internal/services/loadtestservice/registration_gen.go

This file was deleted.

0 comments on commit e39139b

Please sign in to comment.