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

Tests cli resourcemanager client #2849

Merged
merged 4 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
- name: Start services
run: |
./run.sh down up
./run.sh logstt > /tmp/docker-log &
./run.sh tracetest-logs > /tmp/docker-log &
- name: Run tests
run: |
chmod +x ./dist/tracetest ./dist/tracetest-server
Expand Down Expand Up @@ -399,7 +399,7 @@ jobs:
- name: Run integration tests
run: |
./run.sh down up
./run.sh logstt > /tmp/docker-log &
./run.sh tracetest-logs > /tmp/docker-log &
./scripts/wait-for-port.sh 11633

if [ "${{env.CYPRESS_RECORD_KEY}}" = "" ]; then
Expand Down
3 changes: 3 additions & 0 deletions api/triggers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ components:
triggerType:
type: string
enum: ["http", "grpc", "traceid"]
# TODO: remove after test migration
http:
$ref: "./http.yaml#/components/schemas/HTTPRequest"
httpRequest:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this suddenly changed? I think that it would be better if the trigger type enum entries would match the object keys

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the openapi specs are being updated to match the keys on the file formats. They need to match to avoid the need for "transcoding" between the formats, and it's more "stable" to update the openapi instead of making users change their files

$ref: "./http.yaml#/components/schemas/HTTPRequest"
grpc:
$ref: "./grpc.yaml#/components/schemas/GRPCRequest"
traceid:
Expand Down
13 changes: 7 additions & 6 deletions cli/actions/export_test_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,14 @@ func (a exportTestAction) getDefinitionFromServer(ctx context.Context, args Expo
expectedVersion = *test.Version
}

request := a.client.ApiApi.GetTestVersionDefinitionFile(ctx, args.TestId, expectedVersion)
definitionString, _, err := a.client.ApiApi.GetTestVersionDefinitionFileExecute(request)
if err != nil {
return "", fmt.Errorf("could not get test definition: %w", err)
}
// request := a.client.ApiApi.GetTestVersionDefinitionFile(ctx, args.TestId, expectedVersion)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is deprecated, should we remove it instead of having it commented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this will be addressed in a follow up PR

// definitionString, _, err := a.client.ApiApi.GetTestVersionDefinitionFileExecute(request)
// if err != nil {
// return "", fmt.Errorf("could not get test definition: %w", err)
// }

return definitionString, nil
// return definitionString, nil
return "", fmt.Errorf("deprecated")
}

func (a exportTestAction) getTestFromServer(ctx context.Context, testID string) (openapi.Test, error) {
Expand Down
Loading