-
Notifications
You must be signed in to change notification settings - Fork 103
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
[TF-7737] Add fields for Registry Module Testing #781
Conversation
46ce2ff
to
c06df8b
Compare
c06df8b
to
e07b673
Compare
3ef7098
to
bfc640a
Compare
I'm dismissing Nick's request for changes as is blocking the PR from being merged. They are not available today. But I have taken look this PR to made sure that Joseph addressed the changes requested by Nick
Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some test failures I got locally:
2023/10/06 13:23:11 [WARN] Support for using the NoCode field is deprecated as of release 1.22.0 and may be removed in a future version. The preferred way to create a no-code module is with the registryNoCodeModules.Create method.
registry_module_integration_test.go:157:
Error Trace: /Users/sebastianrivera/hashicorp/go-tfe/registry_module_integration_test.go:157
Error: Received unexpected error:
resource not found
Test: TestRegistryModulesCreate/with_valid_options/with_no-code_attribute
2023/10/06 13:23:11 [WARN] Support for using the NoCode field is deprecated as of release 1.22.0 and may be removed in a future version. The preferred way to create a no-code module is with the registryNoCodeModules.Create method.
registry_module_integration_test.go:157:
Error Trace: /Users/sebastianrivera/hashicorp/go-tfe/registry_module_integration_test.go:157
Error: Received unexpected error:
resource not found
Test: TestRegistryModulesCreate/with_valid_options/with_no-code_attribute
2023/10/06 13:23:13 [WARN] Support for using the NoCode field is deprecated as of release 1.22.0 and may be removed in a future version. The preferred way to update a no-code module is with the registryNoCodeModules.Update method.
registry_module_integration_test.go:283:
Error Trace: /Users/sebastianrivera/hashicorp/go-tfe/registry_module_integration_test.go:283
Error: Received unexpected error:
Bad jsonapi struct tag format
Test: TestRegistryModuleUpdate/enable_no-code
=== RUN TestRegistryModuleUpdate/disable_no-code
2023/10/06 13:23:13 [WARN] Support for using the NoCode field is deprecated as of release 1.22.0 and may be removed in a future version. The preferred way to update a no-code module is with the registryNoCodeModules.Update method.
registry_module_integration_test.go:298:
Error Trace: /Users/sebastianrivera/hashicorp/go-tfe/registry_module_integration_test.go:298
Error: Received unexpected error:
Bad jsonapi struct tag format
Test: TestRegistryModuleUpdate/disable_no-code
RegistryName: rm.RegistryName, | ||
}, options) | ||
require.NoError(t, err) | ||
assert.Equal(t, "branch", rm.PublishingMechanism) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.Equal(t, "branch", rm.PublishingMechanism) | |
assert.Equal(t, PublishingMechanismBranch, rm.PublishingMechanism) |
💅 same for "git_tag"
below.
// **Note: This field is still in BETA and subject to change.** | ||
TestConfig *RegistryModuleTestConfigOptions `jsonapi:"attr,test-config,omitempty"` | ||
|
||
VCSRepo *RegistryModuleVCSRepoUpdateOptions `jsonapi:"attr-vcs-repo,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VCSRepo *RegistryModuleVCSRepoUpdateOptions `jsonapi:"attr-vcs-repo,omitempty"` | |
VCSRepo *RegistryModuleVCSRepoUpdateOptions `jsonapi:"attr,vcs-repo,omitempty"` |
Description
These changes are to support testing functionality for the Private Module Registry.
TestConfig
object on theRegistryModule
RegistryModule
by passing aTestConfig
object withTestsEnabled
set totrue
RegistryModule
by passing aTestConfig
object withTestsEnabled
set totrue
RegistryModule
betweengit_tag
andbranch
based publishingTesting plan
External links
Output from tests
Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.