Skip to content

Commit

Permalink
feature: test as a resource (#2701)
Browse files Browse the repository at this point in the history
* feat: new tests openapi spec (#2658)

update get tests endpoint to use resource manager

* fix: move transactions to it's own module (#2664)

* fix: move transactions to the transactions folder

* remove alias to transactions module

* feat: test models + list tests endpoint (#2681)

* add test, run, and trigger objects

* feat: move test and run structs into the test package

* list tests

* add old format attributes again

* fix mapping

* compatibility mode

* fix server prefix integration test

* force server unit tests to run

* fix tracetest test

* trigger CI

* Apply suggestions from code review

Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>

* fix build

* version test specs

* update test names

* use sqlutils

* dont specify branch target in pull_request

* fix list test

---------

Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>

* 2659 cli improvements migrate tests to resource manager architecture get tests frontend (#2702)

chore(frontend): updating FE to support GET /tests endpoint changes

* feat: test list augmented response (#2732)

add augmented list

* fix(server): fix trigger json encoding versioning and test (#2795)

* WIP feat: get endpoint (#2789)

* chore(docs): Adding App Insights Configuration Page (#2820)

* chore(docs): Adding App Insights Configuration Page

* fixing typo

* fix(frontend): Fixing Resizable Panels UI bugs (#2827)

* fix(tests): add analyzer resource to cli e2e table (#2826)

* chore(docs): Azure App Insights Recipes (#2821)

* chore(docs): Adding App Insights Configuration Page

* chore(docs): Adding App Insights Recipes

* chore(docs): Adding App Insights Recipes

* chore(docs): fixing typo

* adding recipe links

* adding recipe links

* fixing typo

* chore(frotend): Test Definition Name Input (#2830)

* chore(frotend): Updating Panel Splitter w/ Tooltip (#2828)

* chore(frotend): Updating Panel Splitter w/ Tooltip

* Updating theme color

* removing unnecessary flag

* undo change

* fix(frontend): fix missing font-face (#2833)

* feat(cli): refactor list formatter for better resource manager support (#2829)

* feat(frontend): add independent trace vs test data (#2815)

* feat(cli): refactor Get formatter for better resource manager support (#2831)

* feat(cli): dynamic list of available resources (#2832)

* feat(cli): refactor Delete to new resource manager client (#2836)

* feat(cli): update export command with new resourcemanager client (#2838)

* Standardize old resources to to use list method with SQL Injection protection and stardardize PollingProfile file (#2839)

* wip: update list on demo and environment to use the same standards as tests and transactions

* Fixing provisioning test

* Update provisioning test

* feature(frontend): Contact Us Modal (#2835)

* feature(frontend): Contact Us Modal

* feature(frontend): Contact Us Modal

* feat(cli): update apply command with new resourcemanager client (#2841)

* feat(frontend): trace vs test data for timeline and attribute list (#2837)

* feat: new tests openapi spec (#2658)

update get tests endpoint to use resource manager

* fix: move transactions to it's own module (#2664)

* fix: move transactions to the transactions folder

* remove alias to transactions module

* feat: test models + list tests endpoint (#2681)

* add test, run, and trigger objects

* feat: move test and run structs into the test package

* list tests

* add old format attributes again

* fix mapping

* compatibility mode

* fix server prefix integration test

* force server unit tests to run

* fix tracetest test

* trigger CI

* Apply suggestions from code review

Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>

* fix build

* version test specs

* update test names

* use sqlutils

* dont specify branch target in pull_request

* fix list test

---------

Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>

* 2659 cli improvements migrate tests to resource manager architecture get tests frontend (#2702)

chore(frontend): updating FE to support GET /tests endpoint changes

* feat: test list augmented response (#2732)

add augmented list

* fix(server): fix trigger json encoding versioning and test (#2795)

* feat: test models + list tests endpoint (#2681)

* add test, run, and trigger objects

* feat: move test and run structs into the test package

* list tests

* add old format attributes again

* fix mapping

* compatibility mode

* fix server prefix integration test

* force server unit tests to run

* fix tracetest test

* trigger CI

* Apply suggestions from code review

Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>

* fix build

* version test specs

* update test names

* use sqlutils

* dont specify branch target in pull_request

* fix list test

---------

Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>

* GET endpoint

* fix rebase

* add create method and fix tests

* add rest of methods

* Changing test structure and fixing method by method

* Update tests

* Fixing test errors for Delete

* Adding gRPC tests

* Adding tests for traceid trigger

* migrate rest of endpoints and fix compilation errors

* fix all unit and integration tests

* Improving tests

* fix building errors

---------

Co-authored-by: Oscar Reyes <oscar-rreyes1@hotmail.com>
Co-authored-by: Jorge Padilla <jorge.esteban.padilla@gmail.com>
Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>
Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com>
Co-authored-by: Daniel Dias <danielbpdias@gmail.com>

* fix a couple of issues

* fix wrong variable name

* fix part of the tracetests

* Fixing small bugs on server

* Fixing test run problem

* fix: tracetests (#2852)

fix grpc tests and transaction tracetests

* fixing FE tests and types

* Updating test assertion validation

* Tests cli resourcemanager client (#2849)

* fixing FE tests and updating models

* fixing FE tests and updating models

* Updating trigger mapping to populate httpRequest field on OpenAPI based endpoints

* Removing deprecated fields

* fix trigger type in fe

* add cli e2e test for test resource (#2854)

* Fixed bug in dogfooding test

* Making backend-arch-graph step not block CI on failure

* fix trigger result type in fe

* Deprecate commands (#2857)

* Move test deprecated notice to subcommands

* Update CLI e2e docs

* fix(docs): fix deprecated test command (#2874)

---------

Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>
Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>
Co-authored-by: Jorge Padilla <jorge.esteban.padilla@gmail.com>
Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com>
Co-authored-by: Daniel Dias <danielbpdias@gmail.com>
Co-authored-by: Sebastian Choren <sebastian.choren@gmail.com>
  • Loading branch information
7 people committed Jul 6, 2023
1 parent 1111cd1 commit bc05cd2
Show file tree
Hide file tree
Showing 202 changed files with 6,918 additions and 7,169 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pull-request.yaml
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [main]
pull_request:
branches: [main]

env:
VERSION: ${{ github.sha }}
Expand All @@ -23,6 +22,7 @@ jobs:
backend-arch-graph:
name: Generate backend architecture graph
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
cache: true
cache-dependency-path: go.work
- name: Run unit tests
run: cd server; make test
run: cd server; make test -B

unit-test-web:
name: WebUI unit tests
Expand Down Expand Up @@ -304,7 +304,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 @@ -400,7 +400,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
70 changes: 12 additions & 58 deletions api/openapi.yaml
Expand Up @@ -31,32 +31,6 @@ paths:
application/json:
schema:
$ref: "./definition.yaml#/components/schemas/ExecuteDefinitionResponse"

put:
tags:
- api
summary: "Upsert a definition"
description: "Upsert a definition"
operationId: upsertDefinition
requestBody:
content:
text/json:
schema:
$ref: "./definition.yaml#/components/schemas/TextDefinition"
responses:
201:
description: Definition created
content:
application/json:
schema:
$ref: "./definition.yaml#/components/schemas/UpsertDefinitionResponse"
200:
description: Definition updated
content:
application/json:
schema:
$ref: "./definition.yaml#/components/schemas/UpsertDefinitionResponse"

# Transactions
/transactions:
get:
Expand Down Expand Up @@ -305,7 +279,7 @@ paths:
/tests:
get:
tags:
- api
- resource-api
summary: "Get tests"
description: "get tests"
operationId: getTests
Expand All @@ -318,22 +292,20 @@ paths:
responses:
200:
description: successful operation
headers:
X-Total-Count:
schema:
type: integer
description: Total records count
content:
application/json:
schema:
type: array
items:
$ref: "./tests.yaml#/components/schemas/Test"
$ref: "./tests.yaml#/components/schemas/TestResourceList"
text/yaml:
schema:
$ref: "./tests.yaml#/components/schemas/TestResourceList"
400:
description: "invalid query for test, some data was sent in incorrect format."
500:
description: "problem with getting tests"
post:
tags:
- api
- resource-api
summary: "Create new test"
description: "Create new test action"
operationId: createTest
Expand All @@ -354,24 +326,23 @@ paths:
/tests/{testId}:
get:
tags:
- api
- resource-api
parameters:
- $ref: "./parameters.yaml#/components/parameters/testId"
summary: "get test"
description: "get test"
operationId: getTest
responses:
200:
description: successful operation
content:
application/json:
schema:
$ref: "./tests.yaml#/components/schemas/Test"
$ref: "./tests.yaml#/components/schemas/TestResource"
500:
description: "problem with getting a test"
put:
tags:
- api
- resource-api
parameters:
- $ref: "./parameters.yaml#/components/parameters/testId"
summary: "update test"
Expand All @@ -389,7 +360,7 @@ paths:
description: "problem with updating test"
delete:
tags:
- api
- resource-api
parameters:
- $ref: "./parameters.yaml#/components/parameters/testId"
summary: "delete a test"
Expand Down Expand Up @@ -625,23 +596,6 @@ paths:
$ref: "./tests.yaml#/components/schemas/Test"
500:
description: "problem with getting a test"
/tests/{testId}/version/{version}/definition.yaml:
get:
tags:
- api
parameters:
- $ref: "./parameters.yaml#/components/parameters/testId"
- $ref: "./parameters.yaml#/components/parameters/version"
summary: Get the test definition as an YAML file
description: Get the test definition as an YAML file
operationId: getTestVersionDefinitionFile
responses:
200:
description: OK
content:
application/yaml:
schema:
type: string
/tests/{testId}/run/{runId}/stop:
post:
tags:
Expand Down
25 changes: 24 additions & 1 deletion api/tests.yaml
@@ -1,6 +1,29 @@
openapi: 3.0.0
components:
schemas:

TestResourceList:
type: object
properties:
count:
type: integer
items:
type: array
items:
$ref: "#/components/schemas/TestResource"

TestResource:
type: object
description: "Represents a test structured into the Resources format."
properties:
type:
type: string
description: "Represents the type of this resource. It should always be set as 'Test'."
enum:
- Test
spec:
$ref: "#/components/schemas/Test"

Test:
type: object
properties:
Expand All @@ -17,7 +40,7 @@ components:
createdAt:
type: string
format: date-time
serviceUnderTest:
trigger:
$ref: "./triggers.yaml#/components/schemas/Trigger"
specs:
type: array
Expand Down
6 changes: 3 additions & 3 deletions api/triggers.yaml
Expand Up @@ -4,10 +4,10 @@ components:
Trigger:
type: object
properties:
triggerType:
type:
type: string
enum: ["http", "grpc", "traceid"]
http:
httpRequest:
$ref: "./http.yaml#/components/schemas/HTTPRequest"
grpc:
$ref: "./grpc.yaml#/components/schemas/GRPCRequest"
Expand All @@ -17,7 +17,7 @@ components:
TriggerResult:
type: object
properties:
triggerType:
type:
type: string
enum: ["http", "grpc", "traceid"]
triggerResult:
Expand Down
89 changes: 0 additions & 89 deletions cli/actions/export_test_action.go

This file was deleted.

54 changes: 0 additions & 54 deletions cli/actions/list_tests_action.go

This file was deleted.

0 comments on commit bc05cd2

Please sign in to comment.