Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functional test for resourceprovider registration (UDT) #8079

Merged

Conversation

lakshmimsft
Copy link
Contributor

Description

-Update to Typespec for ResourceType, ResourceProviderSummary to update defaultApiVersion to be optional field.
-Added test for resourceprovider registration which includes calls to create, list and show resource provider.

Type of change

Fixes: Part of #6688

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
  • If applicable, design document has been reviewed and approved by Radius maintainers/approvers.
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 23, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref 0aa8569
Unique ID func712b8858ce
Image tag pr-func712b8858ce
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func712b8858ce
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func712b8858ce
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func712b8858ce
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func712b8858ce
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func712b8858ce
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 23, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref ed905fd
Unique ID func688b3fed0c
Image tag pr-func688b3fed0c
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func688b3fed0c
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func688b3fed0c
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func688b3fed0c
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func688b3fed0c
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func688b3fed0c
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 23, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref 37505b3
Unique ID func4301c1d27e
Image tag pr-func4301c1d27e
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func4301c1d27e
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func4301c1d27e
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func4301c1d27e
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func4301c1d27e
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func4301c1d27e
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 23, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref 1917123
Unique ID func2b9d13eedc
Image tag pr-func2b9d13eedc
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func2b9d13eedc
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func2b9d13eedc
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func2b9d13eedc
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func2b9d13eedc
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func2b9d13eedc
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@lakshmimsft lakshmimsft force-pushed the lakshmimsft/rpregistrationtest branch from 1917123 to e613a96 Compare November 25, 2024 16:59
@lakshmimsft lakshmimsft force-pushed the lakshmimsft/rpregistrationtest branch from e613a96 to 74e84e0 Compare November 25, 2024 17:03
@lakshmimsft lakshmimsft force-pushed the lakshmimsft/rpregistrationtest branch from 74e84e0 to 9f6f9d7 Compare November 25, 2024 17:20
Signed-off-by: lakshmimsft <ljavadekar@microsoft.com>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Nov 25, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref 6f5c5f9
Unique ID funcaf7fd1cf22
Image tag pr-funcaf7fd1cf22
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcaf7fd1cf22
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funcaf7fd1cf22
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcaf7fd1cf22
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcaf7fd1cf22
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcaf7fd1cf22
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@@ -93,7 +93,7 @@ model ResourceTypeProperties {
provisioningState?: ProvisioningState;

@doc("The default api version for the resource type.")
defaultApiVersion: ApiVersionNameString;
defaultApiVersion?: ApiVersionNameString;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might have missed this in the design doc, but would making this optional require code changes? Why? Because now resource type doesn't have a default API version, and the code needs to go and get it from somewhere else or throw an error?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For anyone else reviewing, this was a mistake in the initial .tsp. It was always supposed to be optional.

@ytimocin - you're making the assumption that anything reads this field. Nothing does yet.

Comment on lines +63 to +65
output, err := cli.RunCommand(ctx, []string{"resource-provider", "list"})
require.NoError(t, err)
require.Contains(t, output, resourceProviderName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this check for the size of the list?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be brittle due to crosstalk between tests.

require.Contains(t, output, resourceProviderName)

// Show details of the resource provider.
output, err = cli.RunCommand(ctx, []string{"resource-provider", "show", resourceProviderName, "--output", "json"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a default resource provider as in if I run rad rp show would it show the default one? Just curious...

Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@lakshmimsft lakshmimsft merged commit 0aa2d6e into radius-project:main Nov 25, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants