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

Optionally send json outputs when creating state versions #452

Merged
merged 7 commits into from Jul 6, 2022

Conversation

brandonc
Copy link
Collaborator

Description

Repurposes the json-state field to only include json outputs

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.

$ TF_ACC=1 go test ./... -v -tags integration -run TestStateVersionsCreate
=== RUN   TestStateVersionsCreate
=== RUN   TestStateVersionsCreate/with_valid_options
=== RUN   TestStateVersionsCreate/with_external_state_representation
=== RUN   TestStateVersionsCreate/with_the_force_flag_set
=== RUN   TestStateVersionsCreate/with_a_run_to_associate_with
    state_version_integration_test.go:245: This can only be tested with the run specific token
=== RUN   TestStateVersionsCreate/without_md5_hash
=== RUN   TestStateVersionsCreate/withous_serial
=== RUN   TestStateVersionsCreate/without_state
=== RUN   TestStateVersionsCreate/with_invalid_workspace_id
--- PASS: TestStateVersionsCreate (14.61s)
    --- PASS: TestStateVersionsCreate/with_valid_options (3.50s)
    --- PASS: TestStateVersionsCreate/with_external_state_representation (2.44s)
    --- PASS: TestStateVersionsCreate/with_the_force_flag_set (3.02s)
    --- SKIP: TestStateVersionsCreate/with_a_run_to_associate_with (0.00s)
    --- PASS: TestStateVersionsCreate/without_md5_hash (0.00s)
    --- PASS: TestStateVersionsCreate/withous_serial (0.00s)
    --- PASS: TestStateVersionsCreate/without_state (0.00s)
    --- PASS: TestStateVersionsCreate/with_invalid_workspace_id (0.00s)
PASS
ok  	github.com/hashicorp/go-tfe	14.869s
?   	github.com/hashicorp/go-tfe/examples/organizations	[no test files]
?   	github.com/hashicorp/go-tfe/examples/workspaces	[no test files]

state_version.go Outdated Show resolved Hide resolved
@@ -186,6 +186,8 @@ func TestStateVersionsCreate(t *testing.T) {
t.Fatal(err)
}

// TODO: check state outputs for the ones we sent in JSONStateOutputs
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this TODO be resolved?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, not until the API changes are merged.

state_version.go Outdated Show resolved Hide resolved
@brandonc brandonc force-pushed the brandonc/jsonstateoutputs branch 2 times, most recently from 507f167 to 138802f Compare July 6, 2022 17:21
annawinkler
annawinkler previously approved these changes Jul 6, 2022
Copy link
Contributor

@annawinkler annawinkler left a comment

Choose a reason for hiding this comment

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

🚀 Hooray for this PR!

@brandonc brandonc merged commit 21015f0 into main Jul 6, 2022
@brandonc brandonc deleted the brandonc/jsonstateoutputs branch July 6, 2022 23:41
@github-actions
Copy link

github-actions bot commented Jul 6, 2022

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.

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.

None yet

3 participants