Skip to content

chore: skip timing-sensistive AgentMetadata test in the standard suite #7237

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

Merged
merged 7 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test-timing target
  • Loading branch information
ammario committed Apr 21, 2023
commit ba6f151a5882da3144d6b2f2df5d8f455a3ef033
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,26 @@ test-postgres-docker:
done
.PHONY: test-postgres-docker

build/go_tests.json: $(GO_SRC_FILES)
go test ./... -list="." -json > "$@"

test-timing: build/go_tests.json
# The timing tests intentionally run without parallelism to avoid flakiness.
function test_cmds {
cat "$<" \
| jq -r '
select(.Action == "output" and (.Output | test("_Timing\n")))
| "go test \(.Package) -run=^\(.Output)"
' \
| grep -v ^$$
}
while read cmd; do
echo "running $$cmd"
$$cmd
done < <(test_cmds)

.PHONY: test-timing

test-clean:
go clean -testcache
.PHONY: test-clean
1 change: 1 addition & 0 deletions agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,7 @@ func TestAgentMetadata_Timing(t *testing.T) {
greetingPath = filepath.Join(dir, "greeting")
script = "echo hello | tee -a " + greetingPath
)
//nolint:dogsled
_, client, _, _, _ := setupAgent(t, agentsdk.Manifest{
Metadata: []codersdk.WorkspaceAgentMetadataDescription{
{
Expand Down