terraform-provider-coder icon indicating copy to clipboard operation
terraform-provider-coder copied to clipboard

feat: add order to coder_metadata

Open BrunoQuaresma opened this issue 2 months ago • 5 comments

Closes https://github.com/coder/terraform-provider-coder/issues/325

BrunoQuaresma avatar Oct 21 '25 17:10 BrunoQuaresma

@johnstcn I have updated the TestMetadata to include one item with the order attribute and added a check(you can check the "Files changed" tab), but it is not working 😞

Error:      	Not equal: 
								expected: "4"
								actual  : "0"

Do you have any idea why?

BrunoQuaresma avatar Oct 22 '25 17:10 BrunoQuaresma

@johnstcn about adding an integration test for this, I think this change is simple enough to be tested only in the TestMetadata, but I would like to understand why you think an integration test for this would be necessary.

BrunoQuaresma avatar Oct 22 '25 17:10 BrunoQuaresma

I would like to understand why you think an integration test for this would be necessary.

Purely out of paranoia, but it's only a suggestion.

johnstcn avatar Oct 23 '25 08:10 johnstcn

@johnstcn related to the integration tests, what minVersion should I set when testing new features?

BrunoQuaresma avatar Oct 23 '25 16:10 BrunoQuaresma

@johnstcn related to the integration tests, what minVersion should I set when testing new features?

If you set minVersion: "v0.0.0" then the integration test will always run. Otherwise, the test will only run based on the version of Coder against which the integration test is actually running.

In CI, the integration tests run against three different versions (from go run ./scripts/coderversion.go):

  • CODER_MAINLINE_VERSION: latest mainline version
  • CODER_STABLE_VERSION: latest stable version
  • CODER_OLDSTABLE_VERSION: previous stable version

So basically if a particular integration test only makes sense to run from a particular Coder version onwards, you set minVersion to that version.

johnstcn avatar Oct 23 '25 16:10 johnstcn