From 9484c048c2e6296bd3dac68fc4839a158b863f71 Mon Sep 17 00:00:00 2001 From: Animesh pathak Date: Fri, 9 Feb 2024 10:29:58 +0000 Subject: [PATCH 1/3] fix: app running command Signed-off-by: Animesh pathak --- fastapi-postgres/Dockerfile | 12 +- fastapi-postgres/keploy/test-set-1/mocks.yaml | 1219 +++++++++++++++++ .../keploy/test-set-1/tests/test-1.yaml | 55 + .../keploy/test-set-1/tests/test-2.yaml | 55 + fastapi-postgres/requirements.txt | 3 +- 5 files changed, 1336 insertions(+), 8 deletions(-) create mode 100755 fastapi-postgres/keploy/test-set-1/mocks.yaml create mode 100755 fastapi-postgres/keploy/test-set-1/tests/test-1.yaml create mode 100755 fastapi-postgres/keploy/test-set-1/tests/test-2.yaml diff --git a/fastapi-postgres/Dockerfile b/fastapi-postgres/Dockerfile index 8dfa645..dc51d4b 100644 --- a/fastapi-postgres/Dockerfile +++ b/fastapi-postgres/Dockerfile @@ -14,11 +14,11 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . # Set environment variables for PostgreSQL -ENV POSTGRES_USER=postgres \ - POSTGRES_PASSWORD=postgres \ - POSTGRES_DB=studentdb \ - POSTGRES_HOST=0.0.0.0 \ - POSTGRES_PORT=5432 +# ENV POSTGRES_USER=postgres \ +# POSTGRES_PASSWORD=postgres \ +# POSTGRES_DB=studentdb \ +# POSTGRES_HOST=0.0.0.0 \ +# POSTGRES_PORT=5432 # Install PostgreSQL client RUN apt-get update && apt-get install -y postgresql-client @@ -27,4 +27,4 @@ RUN apt-get update && apt-get install -y postgresql-client EXPOSE 8000 # Start the FastAPI application -CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] +CMD ["uvicorn", "application.main:app", "--host", "0.0.0.0", "--port", "8000"] diff --git a/fastapi-postgres/keploy/test-set-1/mocks.yaml b/fastapi-postgres/keploy/test-set-1/mocks.yaml new file mode 100755 index 0000000..86b47c1 --- /dev/null +++ b/fastapi-postgres/keploy/test-set-1/mocks.yaml @@ -0,0 +1,1219 @@ +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-0 +spec: + metadata: + type: config + postgresrequests: + - identifier: StartupRequest + length: 8 + payload: AAAACATSFi8= + ssl_request: + is_ssl: true + auth_type: 0 + postgresresponses: + - payload: Tg== + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.216898875Z + restimestampmock: 2024-02-09T10:20:50.218562705Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-1 +spec: + metadata: + type: config + postgresrequests: + - identifier: StartupRequest + payload: AAAAKgADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHN0dWRlbnRkYgAA + auth_type: 0 + postgresresponses: + - header: [R] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + authentication_sasl: + auth_mechanisms: + - SCRAM-SHA-256 + msg_type: 82 + auth_type: 10 + reqtimestampmock: 2024-02-09T10:20:50.232737784Z + restimestampmock: 2024-02-09T10:20:50.233296602Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-2 +spec: + metadata: + type: config + postgresrequests: + - header: [p] + identifier: ClientRequest + length: 8 + password_message: + password: SCRAM-SHA-256 + msg_type: 112 + auth_type: 0 + postgresresponses: + - header: [R] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + authentication_sasl_continue: {data: [114, 61, 68, 54, 118, 109, 56, 118, 117, 82, 116, 89, 111, 116, 75, 81, 75, 86, 74, 100, 55, 47, 85, 115, 107, 90, 70, 78, 88, 79, 112, 80, 88, 84, 67, 105, 103, 86, 51, 101, 73, 90, 48, 105, 119, 117, 65, 106, 111, 83, 44, 115, 61, 117, 110, 74, 50, 122, 68, 57, 75, 121, 76, 47, 109, 83, 114, 117, 111, 102, 121, 55, 112, 84, 81, 61, 61, 44, 105, 61, 52, 48, 57, 54]} + msg_type: 82 + auth_type: 11 + reqtimestampmock: 2024-02-09T10:20:50.234459113Z + restimestampmock: 2024-02-09T10:20:50.234488904Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-3 +spec: + metadata: + type: config + postgresrequests: + - header: [p] + identifier: ClientRequest + length: 8 + msg_type: 112 + auth_type: 0 + postgresresponses: + - header: [R, R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + authentication_sasl_final: {data: [118, 61, 118, 48, 53, 82, 117, 66, 89, 50, 52, 51, 72, 85, 67, 97, 116, 102, 83, 55, 67, 69, 70, 43, 72, 84, 106, 89, 90, 79, 118, 115, 115, 78, 48, 56, 116, 120, 99, 48, 103, 106, 105, 119, 85, 61]} + backend_key_data: + process_id: 34 + secret_key: 4065475156 + parameter_status: + - name: in_hot_standby + value: "off" + - name: integer_datetimes + value: "on" + - name: TimeZone + value: Etc/UTC + - name: IntervalStyle + value: postgres + - name: is_superuser + value: "on" + - name: application_name + value: "" + - name: default_transaction_read_only + value: "off" + - name: scram_iterations + value: "4096" + - name: DateStyle + value: ISO, MDY + - name: standard_conforming_strings + value: "on" + - name: session_authorization + value: postgres + - name: client_encoding + value: UTF8 + - name: server_version + value: 16.1 (Debian 16.1-1.pgdg120+1) + - name: server_encoding + value: UTF8 + - name: server_encoding + value: UTF8 + - name: server_encoding + value: UTF8 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.240419203Z + restimestampmock: 2024-02-09T10:20:50.24047866Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-4 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: BEGIN + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 66 + - 69 + - 71 + - 73 + - 78 + ready_for_query: + txstatus: 84 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.241574547Z + restimestampmock: 2024-02-09T10:20:50.241651254Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-5 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + payload: UQAAAHdTRUxFQ1QgdC5vaWQsIHR5cGFycmF5CkZST00gcGdfdHlwZSB0IEpPSU4gcGdfbmFtZXNwYWNlIG5zCiAgICBPTiB0eXBuYW1lc3BhY2UgPSBucy5vaWQKV0hFUkUgdHlwbmFtZSA9ICdoc3RvcmUnOwoA + query: + string: 'SELECT t.oid, typarray FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid WHERE typname = ''hstore''; ' + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 48 + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [111, 105, 100], table_oid: 1247, table_attribute_number: 1, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}, {name: [116, 121, 112, 97, 114, 114, 97, 121], table_oid: 1247, table_attribute_number: 15, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.243360791Z + restimestampmock: 2024-02-09T10:20:50.243385416Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-6 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: ROLLBACK + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 82 + - 79 + - 76 + - 76 + - 66 + - 65 + - 67 + - 75 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.244072772Z + restimestampmock: 2024-02-09T10:20:50.244098563Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-7 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: BEGIN + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 66 + - 69 + - 71 + - 73 + - 78 + ready_for_query: + txstatus: 84 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.244693006Z + restimestampmock: 2024-02-09T10:20:50.244715338Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-8 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: select pg_catalog.version() + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAACAAAXZlcnNpb24AAAAAAAAAAAAAGf///////wAARAAAAIMAAQAAAHlQb3N0Z3JlU1FMIDE2LjEgKERlYmlhbiAxNi4xLTEucGdkZzEyMCsxKSBvbiBhYXJjaDY0LXVua25vd24tbGludXgtZ251LCBjb21waWxlZCBieSBnY2MgKERlYmlhbiAxMi4yLjAtMTQpIDEyLjIuMCwgNjQtYml0QwAAAA1TRUxFQ1QgMQBaAAAABVQ= + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 49 + data_row: [{row_values: ['PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit']}, {row_values: ['PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit']}, {row_values: ['PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit']}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [118, 101, 114, 115, 105, 111, 110], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.24516216Z + restimestampmock: 2024-02-09T10:20:50.245191367Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-9 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: select current_schema() + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAACcAAWN1cnJlbnRfc2NoZW1hAAAAAAAAAAAAABMAQP////8AAEQAAAAQAAEAAAAGcHVibGljQwAAAA1TRUxFQ1QgMQBaAAAABVQ= + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 49 + data_row: [{row_values: [public]}, {row_values: [public]}, {row_values: [public]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [99, 117, 114, 114, 101, 110, 116, 95, 115, 99, 104, 101, 109, 97], table_oid: 0, table_attribute_number: 0, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.246241214Z + restimestampmock: 2024-02-09T10:20:50.246281713Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-10 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: show transaction isolation level + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAAC4AAXRyYW5zYWN0aW9uX2lzb2xhdGlvbgAAAAAAAAAAAAAZ////////AABEAAAAGAABAAAADnJlYWQgY29tbWl0dGVkQwAAAAlTSE9XAFoAAAAFVA== + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 72 + - 79 + - 87 + data_row: [{row_values: [read committed]}, {row_values: [read committed]}, {row_values: [read committed]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [116, 114, 97, 110, 115, 97, 99, 116, 105, 111, 110, 95, 105, 115, 111, 108, 97, 116, 105, 111, 110], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.247356559Z + restimestampmock: 2024-02-09T10:20:50.247387933Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-11 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: show standard_conforming_strings + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAADQAAXN0YW5kYXJkX2NvbmZvcm1pbmdfc3RyaW5ncwAAAAAAAAAAAAAZ////////AABEAAAADAABAAAAAm9uQwAAAAlTSE9XAFoAAAAFVA== + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 72 + - 79 + - 87 + data_row: [{row_values: ["on"]}, {row_values: ["on"]}, {row_values: ["on"]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [115, 116, 97, 110, 100, 97, 114, 100, 95, 99, 111, 110, 102, 111, 114, 109, 105, 110, 103, 95, 115, 116, 114, 105, 110, 103, 115], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.248114456Z + restimestampmock: 2024-02-09T10:20:50.24815283Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-12 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: ROLLBACK + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 82 + - 79 + - 76 + - 76 + - 66 + - 65 + - 67 + - 75 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.248975766Z + restimestampmock: 2024-02-09T10:20:50.24899789Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-13 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: BEGIN + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 66 + - 69 + - 71 + - 73 + - 78 + ready_for_query: + txstatus: 84 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.252045225Z + restimestampmock: 2024-02-09T10:20:50.252072266Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-14 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + payload: UQAAAYdTRUxFQ1QgcGdfY2F0YWxvZy5wZ19jbGFzcy5yZWxuYW1lIApGUk9NIHBnX2NhdGFsb2cucGdfY2xhc3MgSk9JTiBwZ19jYXRhbG9nLnBnX25hbWVzcGFjZSBPTiBwZ19jYXRhbG9nLnBnX25hbWVzcGFjZS5vaWQgPSBwZ19jYXRhbG9nLnBnX2NsYXNzLnJlbG5hbWVzcGFjZSAKV0hFUkUgcGdfY2F0YWxvZy5wZ19jbGFzcy5yZWxuYW1lID0gJ3N0dWRlbnRzJyBBTkQgcGdfY2F0YWxvZy5wZ19jbGFzcy5yZWxraW5kID0gQU5ZIChBUlJBWVsncicsICdwJywgJ2YnLCAndicsICdtJ10pIEFORCBwZ19jYXRhbG9nLnBnX3RhYmxlX2lzX3Zpc2libGUocGdfY2F0YWxvZy5wZ19jbGFzcy5vaWQpIEFORCBwZ19jYXRhbG9nLnBnX25hbWVzcGFjZS5uc3BuYW1lICE9ICdwZ19jYXRhbG9nJwA= + query: + string: SELECT pg_catalog.pg_class.relname FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace WHERE pg_catalog.pg_class.relname = 'students' AND pg_catalog.pg_class.relkind = ANY (ARRAY['r', 'p', 'f', 'v', 'm']) AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid) AND pg_catalog.pg_namespace.nspname != 'pg_catalog' + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAACAAAXJlbG5hbWUAAAAE6wACAAAAEwBA/////wAARAAAABIAAQAAAAhzdHVkZW50c0MAAAANU0VMRUNUIDEAWgAAAAVU + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 49 + data_row: [{row_values: [students]}, {row_values: [students]}, {row_values: [students]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [114, 101, 108, 110, 97, 109, 101], table_oid: 1259, table_attribute_number: 2, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.253162445Z + restimestampmock: 2024-02-09T10:20:50.253222319Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-15 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: COMMIT + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 67 + - 79 + - 77 + - 77 + - 73 + - 84 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:20:50.254107087Z + restimestampmock: 2024-02-09T10:20:50.25412767Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-16 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: BEGIN + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 66 + - 69 + - 71 + - 73 + - 78 + ready_for_query: + txstatus: 84 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:01.542685552Z + restimestampmock: 2024-02-09T10:21:01.542714843Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-17 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + payload: UQAAATBTRUxFQ1Qgc3R1ZGVudHMuIklEIiBBUyAic3R1ZGVudHNfSUQiLCBzdHVkZW50cy4iTmFtZSIgQVMgInN0dWRlbnRzX05hbWUiLCBzdHVkZW50cy4iRW1haWwiIEFTICJzdHVkZW50c19FbWFpbCIsIHN0dWRlbnRzLiJIYXNoZWQgUGFzc3dvcmQiIEFTICJzdHVkZW50c19IYXNoZWQgUGFzc3dvcmQiLCBzdHVkZW50cy4iU3ViamVjdCBTdHJlYW0iIEFTICJzdHVkZW50c19TdWJqZWN0IFN0cmVhbSIgCkZST00gc3R1ZGVudHMgCldIRVJFIHN0dWRlbnRzLiJFbWFpbCIgPSAnZXZhd2hpdGVAZXhhbXBsZS5jb20nIAogTElNSVQgMQA= + query: + string: SELECT students."ID" AS "students_ID", students."Name" AS "students_Name", students."Email" AS "students_Email", students."Hashed Password" AS "students_Hashed Password", students."Subject Stream" AS "students_Subject Stream" FROM students WHERE students."Email" = 'evawhite@example.com' LIMIT 1 + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 48 + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:01.543969268Z + restimestampmock: 2024-02-09T10:21:01.544053057Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-18 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: INSERT INTO students ("Name", "Email", "Hashed Password", "Subject Stream") VALUES ('Eva White', 'evawhite@example.com', 'sfwbxijuf222', 'Mathematics') RETURNING students."ID" + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAABsAAUlEAAAAYAEAAQAAABcABP////8AAEQAAAALAAEAAAABMUMAAAAPSU5TRVJUIDAgMQBaAAAABVQ= + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 73 + - 78 + - 83 + - 69 + - 82 + - 84 + - 32 + - 48 + - 32 + - 49 + data_row: [{row_values: ["1"]}, {row_values: ["1"]}, {row_values: ["1"]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:01.546426702Z + restimestampmock: 2024-02-09T10:21:01.546463701Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-19 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: COMMIT + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 67 + - 79 + - 77 + - 77 + - 73 + - 84 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:01.551006372Z + restimestampmock: 2024-02-09T10:21:01.55108062Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-20 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: BEGIN + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 66 + - 69 + - 71 + - 73 + - 78 + ready_for_query: + txstatus: 84 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:01.552699118Z + restimestampmock: 2024-02-09T10:21:01.552721743Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-21 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + payload: UQAAAJtTRUxFQ1Qgc3R1ZGVudHMuIklEIiwgc3R1ZGVudHMuIk5hbWUiLCBzdHVkZW50cy4iRW1haWwiLCBzdHVkZW50cy4iSGFzaGVkIFBhc3N3b3JkIiwgc3R1ZGVudHMuIlN1YmplY3QgU3RyZWFtIiAKRlJPTSBzdHVkZW50cyAKV0hFUkUgc3R1ZGVudHMuIklEIiA9IDEA + query: + string: SELECT students."ID", students."Name", students."Email", students."Hashed Password", students."Subject Stream" FROM students WHERE students."ID" = 1 + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAAI0ABUlEAAAAYAEAAQAAABcABP////8AAE5hbWUAAABgAQACAAAEE////////wAARW1haWwAAABgAQADAAAEE////////wAASGFzaGVkIFBhc3N3b3JkAAAAYAEABAAABBP///////8AAFN1YmplY3QgU3RyZWFtAAAAYAEABQAABBP///////8AAEQAAABPAAUAAAABMQAAAAlFdmEgV2hpdGUAAAAUZXZhd2hpdGVAZXhhbXBsZS5jb20AAAAMc2Z3YnhpanVmMjIyAAAAC01hdGhlbWF0aWNzQwAAAA1TRUxFQ1QgMQBaAAAABVQ= + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 49 + data_row: [{row_values: ["1", Eva White, evawhite@example.com, sfwbxijuf222, Mathematics]}, {row_values: ["1", Eva White, evawhite@example.com, sfwbxijuf222, Mathematics]}, {row_values: ["1", Eva White, evawhite@example.com, sfwbxijuf222, Mathematics]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:01.553203147Z + restimestampmock: 2024-02-09T10:21:01.553236062Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-22 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: ROLLBACK + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 82 + - 79 + - 76 + - 76 + - 66 + - 65 + - 67 + - 75 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:01.556089153Z + restimestampmock: 2024-02-09T10:21:01.556110861Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-23 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: BEGIN + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 66 + - 69 + - 71 + - 73 + - 78 + ready_for_query: + txstatus: 84 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:11.223148624Z + restimestampmock: 2024-02-09T10:21:11.223211164Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-24 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + payload: UQAAAS9TRUxFQ1Qgc3R1ZGVudHMuIklEIiBBUyAic3R1ZGVudHNfSUQiLCBzdHVkZW50cy4iTmFtZSIgQVMgInN0dWRlbnRzX05hbWUiLCBzdHVkZW50cy4iRW1haWwiIEFTICJzdHVkZW50c19FbWFpbCIsIHN0dWRlbnRzLiJIYXNoZWQgUGFzc3dvcmQiIEFTICJzdHVkZW50c19IYXNoZWQgUGFzc3dvcmQiLCBzdHVkZW50cy4iU3ViamVjdCBTdHJlYW0iIEFTICJzdHVkZW50c19TdWJqZWN0IFN0cmVhbSIgCkZST00gc3R1ZGVudHMgCldIRVJFIHN0dWRlbnRzLiJFbWFpbCIgPSAnam9obmRvZUBleGFtcGxlLmNvbScgCiBMSU1JVCAxAA== + query: + string: SELECT students."ID" AS "students_ID", students."Name" AS "students_Name", students."Email" AS "students_Email", students."Hashed Password" AS "students_Hashed Password", students."Subject Stream" AS "students_Subject Stream" FROM students WHERE students."Email" = 'johndoe@example.com' LIMIT 1 + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 48 + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:11.224563961Z + restimestampmock: 2024-02-09T10:21:11.224606043Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-25 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: INSERT INTO students ("Name", "Email", "Hashed Password", "Subject Stream") VALUES ('John Doe', 'johndoe@example.com', 'skpioepf234', 'Mathematics') RETURNING students."ID" + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAABsAAUlEAAAAYAEAAQAAABcABP////8AAEQAAAALAAEAAAABMkMAAAAPSU5TRVJUIDAgMQBaAAAABVQ= + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 73 + - 78 + - 83 + - 69 + - 82 + - 84 + - 32 + - 48 + - 32 + - 49 + data_row: [{row_values: ["2"]}, {row_values: ["2"]}, {row_values: ["2"]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:11.226669655Z + restimestampmock: 2024-02-09T10:21:11.226748861Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-26 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: COMMIT + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 67 + - 79 + - 77 + - 77 + - 73 + - 84 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:11.232155218Z + restimestampmock: 2024-02-09T10:21:11.232190134Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-27 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: BEGIN + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 66 + - 69 + - 71 + - 73 + - 78 + ready_for_query: + txstatus: 84 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:11.233212565Z + restimestampmock: 2024-02-09T10:21:11.233238147Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-28 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + payload: UQAAAJtTRUxFQ1Qgc3R1ZGVudHMuIklEIiwgc3R1ZGVudHMuIk5hbWUiLCBzdHVkZW50cy4iRW1haWwiLCBzdHVkZW50cy4iSGFzaGVkIFBhc3N3b3JkIiwgc3R1ZGVudHMuIlN1YmplY3QgU3RyZWFtIiAKRlJPTSBzdHVkZW50cyAKV0hFUkUgc3R1ZGVudHMuIklEIiA9IDIA + query: + string: SELECT students."ID", students."Name", students."Email", students."Hashed Password", students."Subject Stream" FROM students WHERE students."ID" = 2 + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [T, D, C, Z] + identifier: ServerResponse + length: 8 + payload: VAAAAI0ABUlEAAAAYAEAAQAAABcABP////8AAE5hbWUAAABgAQACAAAEE////////wAARW1haWwAAABgAQADAAAEE////////wAASGFzaGVkIFBhc3N3b3JkAAAAYAEABAAABBP///////8AAFN1YmplY3QgU3RyZWFtAAAAYAEABQAABBP///////8AAEQAAABMAAUAAAABMgAAAAhKb2huIERvZQAAABNqb2huZG9lQGV4YW1wbGUuY29tAAAAC3NrcGlvZXBmMjM0AAAAC01hdGhlbWF0aWNzQwAAAA1TRUxFQ1QgMQBaAAAABVQ= + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 83 + - 69 + - 76 + - 69 + - 67 + - 84 + - 32 + - 49 + data_row: [{row_values: ["2", John Doe, johndoe@example.com, skpioepf234, Mathematics]}, {row_values: ["2", John Doe, johndoe@example.com, skpioepf234, Mathematics]}, {row_values: ["2", John Doe, johndoe@example.com, skpioepf234, Mathematics]}] + ready_for_query: + txstatus: 84 + row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:11.233889547Z + restimestampmock: 2024-02-09T10:21:11.233922754Z +--- +version: api.keploy.io/v1beta1 +kind: Postgres +name: mock-29 +spec: + metadata: + type: config + postgresrequests: + - header: [Q] + identifier: ClientRequest + length: 8 + query: + string: ROLLBACK + msg_type: 81 + auth_type: 0 + postgresresponses: + - header: [C, Z] + identifier: ServerResponse + length: 8 + authentication_md5_password: + salt: + - 0 + - 0 + - 0 + - 0 + command_complete: + - command_tag: + - 82 + - 79 + - 76 + - 76 + - 66 + - 65 + - 67 + - 75 + ready_for_query: + txstatus: 73 + msg_type: 90 + auth_type: 0 + reqtimestampmock: 2024-02-09T10:21:11.236845177Z + restimestampmock: 2024-02-09T10:21:11.236868259Z diff --git a/fastapi-postgres/keploy/test-set-1/tests/test-1.yaml b/fastapi-postgres/keploy/test-set-1/tests/test-1.yaml new file mode 100755 index 0000000..e5100d2 --- /dev/null +++ b/fastapi-postgres/keploy/test-set-1/tests/test-1.yaml @@ -0,0 +1,55 @@ +version: api.keploy.io/v1beta1 +kind: Http +name: test-1 +spec: + metadata: {} + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: http://127.0.0.1:8000/students/ + header: + Accept: '*/*' + Content-Length: "105" + Content-Type: application/json + Host: 127.0.0.1:8000 + User-Agent: curl/8.2.1 + body: |- + { + "name": "Eva White", + "email": "evawhite@example.com", + "password": "evawhite111" + } + body_type: "" + timestamp: 2024-02-09T10:21:01.532943145Z + host: "" + resp: + status_code: 200 + header: + Content-Length: "107" + Content-Type: application/json + Date: Fri, 09 Feb 2024 10:21:00 GMT + Server: uvicorn + body: '{"name":"Eva White","email":"evawhite@example.com","password":"sfwbxijuf222","stream":"Mathematics","id":1}' + body_type: "" + status_message: "" + proto_major: 0 + proto_minor: 0 + timestamp: 2024-02-09T10:21:03.574647019Z + objects: [] + assertions: + noise: + header.Date: [] + created: 1707474063 +curl: |- + curl --request POST \ + --url http://127.0.0.1:8000/students/ \ + --header 'Host: 127.0.0.1:8000' \ + --header 'User-Agent: curl/8.2.1' \ + --header 'Accept: */*' \ + --header 'Content-Type: application/json' \ + --data '{ + "name": "Eva White", + "email": "evawhite@example.com", + "password": "evawhite111" + }' diff --git a/fastapi-postgres/keploy/test-set-1/tests/test-2.yaml b/fastapi-postgres/keploy/test-set-1/tests/test-2.yaml new file mode 100755 index 0000000..ecddaf6 --- /dev/null +++ b/fastapi-postgres/keploy/test-set-1/tests/test-2.yaml @@ -0,0 +1,55 @@ +version: api.keploy.io/v1beta1 +kind: Http +name: test-2 +spec: + metadata: {} + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: http://127.0.0.1:8000/students/ + header: + Accept: '*/*' + Content-Length: "106" + Content-Type: application/json + Host: 127.0.0.1:8000 + User-Agent: curl/8.2.1 + body: |4- + { + "name": "John Doe", + "email": "johndoe@example.com", + "password": "johndoe123" + } + body_type: "" + timestamp: 2024-02-09T10:21:11.21894436Z + host: "" + resp: + status_code: 200 + header: + Content-Length: "104" + Content-Type: application/json + Date: Fri, 09 Feb 2024 10:21:10 GMT + Server: uvicorn + body: '{"name":"John Doe","email":"johndoe@example.com","password":"skpioepf234","stream":"Mathematics","id":2}' + body_type: "" + status_message: "" + proto_major: 0 + proto_minor: 0 + timestamp: 2024-02-09T10:21:13.238027535Z + objects: [] + assertions: + noise: + header.Date: [] + created: 1707474073 +curl: |- + curl --request POST \ + --url http://127.0.0.1:8000/students/ \ + --header 'User-Agent: curl/8.2.1' \ + --header 'Accept: */*' \ + --header 'Content-Type: application/json' \ + --header 'Host: 127.0.0.1:8000' \ + --data ' { + "name": "John Doe", + "email": "johndoe@example.com", + "password": "johndoe123" + }' diff --git a/fastapi-postgres/requirements.txt b/fastapi-postgres/requirements.txt index 946ca50..5201c90 100644 --- a/fastapi-postgres/requirements.txt +++ b/fastapi-postgres/requirements.txt @@ -22,7 +22,6 @@ pydantic==2.4.2 pydantic-extra-types==2.1.0 pydantic-settings==2.0.3 pydantic_core==2.10.1 -pyscopg2==66.0.2 python-dotenv==1.0.0 python-multipart==0.0.6 PyYAML==6.0.1 @@ -34,4 +33,4 @@ ujson==5.8.0 uvicorn==0.23.2 uvloop==0.17.0 watchfiles==0.20.0 -websockets==11.0.3 \ No newline at end of file +websockets==11.0.3 From 4b32939af032314b01ef561bb5772c12379b41b3 Mon Sep 17 00:00:00 2001 From: Animesh pathak Date: Mon, 4 Mar 2024 06:05:20 +0000 Subject: [PATCH 2/3] fix: docker and readme instruction Signed-off-by: Animesh pathak --- django-postgres/README.md | 20 +- fastapi-postgres/README.md | 24 +- fastapi-postgres/application/database.py | 2 +- fastapi-postgres/docker-compose.yml | 16 + fastapi-postgres/keploy/test-set-0/mocks.yaml | 1567 ----------------- .../keploy/test-set-0/tests/test-1.yaml | 45 - .../keploy/test-set-0/tests/test-2.yaml | 58 - .../keploy/test-set-0/tests/test-3.yaml | 45 - .../keploy/test-set-0/tests/test-4.yaml | 45 - .../keploy/test-set-0/tests/test-5.yaml | 45 - .../keploy/test-set-0/tests/test-6.yaml | 45 - fastapi-postgres/keploy/test-set-1/mocks.yaml | 1219 ------------- .../keploy/test-set-1/tests/test-1.yaml | 55 - .../keploy/test-set-1/tests/test-2.yaml | 55 - .../keploy/testReports/report-1.yaml | 519 ------ fastapi-postgres/sql/init.sql | 4 +- fastapi-twilio/README.md | 20 +- flask-mongo/README.md | 2 +- 18 files changed, 31 insertions(+), 3755 deletions(-) delete mode 100755 fastapi-postgres/keploy/test-set-0/mocks.yaml delete mode 100755 fastapi-postgres/keploy/test-set-0/tests/test-1.yaml delete mode 100755 fastapi-postgres/keploy/test-set-0/tests/test-2.yaml delete mode 100755 fastapi-postgres/keploy/test-set-0/tests/test-3.yaml delete mode 100755 fastapi-postgres/keploy/test-set-0/tests/test-4.yaml delete mode 100755 fastapi-postgres/keploy/test-set-0/tests/test-5.yaml delete mode 100755 fastapi-postgres/keploy/test-set-0/tests/test-6.yaml delete mode 100755 fastapi-postgres/keploy/test-set-1/mocks.yaml delete mode 100755 fastapi-postgres/keploy/test-set-1/tests/test-1.yaml delete mode 100755 fastapi-postgres/keploy/test-set-1/tests/test-2.yaml delete mode 100755 fastapi-postgres/keploy/testReports/report-1.yaml diff --git a/django-postgres/README.md b/django-postgres/README.md index 16d6192..91161b4 100644 --- a/django-postgres/README.md +++ b/django-postgres/README.md @@ -19,25 +19,11 @@ git clone https://github.com/keploy/samples-python.git && cd samples-python/djan Keploy can be installed on Linux directly and on Windows with the help of WSL. Based on your system architecture, install the keploy latest binary release -**1. AMD Architecture** - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy -``` - -
- 2. ARM Architecture - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy +```bash + curl -O https://raw.githubusercontent.com/keploy/keploy/main/keploy.sh && source keploy.sh + keploy ``` -
- ### Starting the PostgreSQL Instance ```bash diff --git a/fastapi-postgres/README.md b/fastapi-postgres/README.md index 888804d..d902662 100644 --- a/fastapi-postgres/README.md +++ b/fastapi-postgres/README.md @@ -20,25 +20,11 @@ pip3 install -r requirements.txt Keploy can be installed on Linux directly and on Windows with the help of WSL. Based on your system architecture, install the keploy latest binary release -**1. AMD Architecture** - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy -``` - -
- 2. ARM Architecture - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy +```bash + curl -O https://raw.githubusercontent.com/keploy/keploy/main/keploy.sh && source keploy.sh + keploy ``` -
- ### Starting the PostgreSQL Instance ```bash @@ -51,7 +37,7 @@ docker-compose up -d This command will start the recording of API calls using ebpf:- ```shell -sudo -E keploy record -c "uvicorn application.main:app --reload" +sudo -E PATH=$PATH keploy record -c "uvicorn application.main:app --reload" ``` Make API Calls using Hoppscotch, Postman or cURL command. Keploy with capture those calls to generate the test-suites containing testcases and data mocks. @@ -118,7 +104,7 @@ Now all these API calls were captured as **editable** testcases and written to ` Now let's run the application in test mode. ```shell -sudo -E keploy test -c "uvicorn application.main:app --reload" --delay 10 +sudo -E PATH=$PATH keploy test -c "uvicorn application.main:app --reload" --delay 10 ``` So, no need to setup fake database/apis like Postgres or write mocks for them. Keploy automatically mocks them and, **The application thinks it's talking to Postgres 😄** diff --git a/fastapi-postgres/application/database.py b/fastapi-postgres/application/database.py index 044ffb7..8b00777 100644 --- a/fastapi-postgres/application/database.py +++ b/fastapi-postgres/application/database.py @@ -3,7 +3,7 @@ from sqlalchemy.orm import sessionmaker -SQLALCHEMY_DATABASE_URL = "postgresql://postgres:postgres@0.0.0.0:5432/studentdb" +SQLALCHEMY_DATABASE_URL = "postgresql://postgres:postgres@postgres:5432/studentdb" engine = create_engine(SQLALCHEMY_DATABASE_URL) SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) diff --git a/fastapi-postgres/docker-compose.yml b/fastapi-postgres/docker-compose.yml index 8cffd1a..8ce911d 100644 --- a/fastapi-postgres/docker-compose.yml +++ b/fastapi-postgres/docker-compose.yml @@ -11,3 +11,19 @@ services: - "5432:5432" # Map the PostgreSQL port to the host machine volumes: - ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql + networks: + - keploy-network + + app: + container_name: fastapi-app + image: fastapi + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + ports: + - 8000:8000 + depends_on: + - postgres + networks: + - keploy-network \ No newline at end of file diff --git a/fastapi-postgres/keploy/test-set-0/mocks.yaml b/fastapi-postgres/keploy/test-set-0/mocks.yaml deleted file mode 100755 index e1a173b..0000000 --- a/fastapi-postgres/keploy/test-set-0/mocks.yaml +++ /dev/null @@ -1,1567 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - identifier: StartupRequest - length: 8 - payload: AAAACATSFi8= - ssl_request: - is_ssl: true - auth_type: 0 - postgresresponses: - - payload: Tg== - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - identifier: StartupRequest - payload: AAAAKgADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHN0dWRlbnRkYgAA - auth_type: 0 - postgresresponses: - - header: [R] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl: - auth_mechanisms: - - SCRAM-SHA-256 - msg_type: 82 - auth_type: 10 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [p] - identifier: ClientRequest - length: 8 - password_message: - password: SCRAM-SHA-256 - msg_type: 112 - auth_type: 0 - postgresresponses: - - header: [R] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl_continue: {data: [114, 61, 52, 74, 86, 106, 122, 74, 112, 52, 47, 119, 114, 53, 76, 107, 84, 51, 47, 80, 100, 82, 122, 65, 109, 99, 112, 117, 117, 82, 118, 49, 67, 99, 87, 86, 114, 102, 122, 72, 79, 51, 51, 82, 105, 77, 105, 105, 52, 98, 44, 115, 61, 66, 89, 47, 121, 78, 51, 75, 102, 49, 117, 90, 109, 90, 69, 100, 85, 72, 111, 68, 105, 117, 81, 61, 61, 44, 105, 61, 52, 48, 57, 54]} - msg_type: 82 - auth_type: 11 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [p] - identifier: ClientRequest - length: 8 - msg_type: 112 - auth_type: 0 - postgresresponses: - - header: [R, R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl_final: {data: [118, 61, 84, 87, 72, 57, 77, 119, 88, 70, 57, 109, 51, 107, 113, 85, 71, 76, 56, 110, 52, 104, 43, 97, 50, 106, 83, 89, 55, 74, 53, 109, 97, 122, 75, 111, 77, 83, 51, 52, 53, 75, 89, 80, 107, 61]} - backend_key_data: - process_id: 33 - secret_key: 4106888949 - parameter_status: - - name: in_hot_standby - value: "off" - - name: integer_datetimes - value: "on" - - name: TimeZone - value: Etc/UTC - - name: IntervalStyle - value: postgres - - name: is_superuser - value: "on" - - name: application_name - value: "" - - name: default_transaction_read_only - value: "off" - - name: scram_iterations - value: "4096" - - name: DateStyle - value: ISO, MDY - - name: standard_conforming_strings - value: "on" - - name: session_authorization - value: postgres - - name: client_encoding - value: UTF8 - - name: server_version - value: 16.0 (Debian 16.0-1.pgdg120+1) - - name: server_encoding - value: UTF8 - - name: server_encoding - value: UTF8 - - name: server_encoding - value: UTF8 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: | - SELECT t.oid, typarray - FROM pg_type t JOIN pg_namespace ns - ON typnamespace = ns.oid - WHERE typname = 'hstore'; - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 48 - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [111, 105, 100], table_oid: 1247, table_attribute_number: 1, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}, {name: [116, 121, 112, 97, 114, 114, 97, 121], table_oid: 1247, table_attribute_number: 15, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: select pg_catalog.version() - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{values: [[80, 111, 115, 116, 103, 114, 101, 83, 81, 76, 32, 49, 54, 46, 48, 32, 40, 68, 101, 98, 105, 97, 110, 32, 49, 54, 46, 48, 45, 49, 46, 112, 103, 100, 103, 49, 50, 48, 43, 49, 41, 32, 111, 110, 32, 120, 56, 54, 95, 54, 52, 45, 112, 99, 45, 108, 105, 110, 117, 120, 45, 103, 110, 117, 44, 32, 99, 111, 109, 112, 105, 108, 101, 100, 32, 98, 121, 32, 103, 99, 99, 32, 40, 68, 101, 98, 105, 97, 110, 32, 49, 50, 46, 50, 46, 48, 45, 49, 52, 41, 32, 49, 50, 46, 50, 46, 48, 44, 32, 54, 52, 45, 98, 105, 116]]}, {values: [[80, 111, 115, 116, 103, 114, 101, 83, 81, 76, 32, 49, 54, 46, 48, 32, 40, 68, 101, 98, 105, 97, 110, 32, 49, 54, 46, 48, 45, 49, 46, 112, 103, 100, 103, 49, 50, 48, 43, 49, 41, 32, 111, 110, 32, 120, 56, 54, 95, 54, 52, 45, 112, 99, 45, 108, 105, 110, 117, 120, 45, 103, 110, 117, 44, 32, 99, 111, 109, 112, 105, 108, 101, 100, 32, 98, 121, 32, 103, 99, 99, 32, 40, 68, 101, 98, 105, 97, 110, 32, 49, 50, 46, 50, 46, 48, 45, 49, 52, 41, 32, 49, 50, 46, 50, 46, 48, 44, 32, 54, 52, 45, 98, 105, 116]]}, {values: [[80, 111, 115, 116, 103, 114, 101, 83, 81, 76, 32, 49, 54, 46, 48, 32, 40, 68, 101, 98, 105, 97, 110, 32, 49, 54, 46, 48, 45, 49, 46, 112, 103, 100, 103, 49, 50, 48, 43, 49, 41, 32, 111, 110, 32, 120, 56, 54, 95, 54, 52, 45, 112, 99, 45, 108, 105, 110, 117, 120, 45, 103, 110, 117, 44, 32, 99, 111, 109, 112, 105, 108, 101, 100, 32, 98, 121, 32, 103, 99, 99, 32, 40, 68, 101, 98, 105, 97, 110, 32, 49, 50, 46, 50, 46, 48, 45, 49, 52, 41, 32, 49, 50, 46, 50, 46, 48, 44, 32, 54, 52, 45, 98, 105, 116]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [118, 101, 114, 115, 105, 111, 110], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: select current_schema() - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{values: [[112, 117, 98, 108, 105, 99]]}, {values: [[112, 117, 98, 108, 105, 99]]}, {values: [[112, 117, 98, 108, 105, 99]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [99, 117, 114, 114, 101, 110, 116, 95, 115, 99, 104, 101, 109, 97], table_oid: 0, table_attribute_number: 0, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: show transaction isolation level - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 72 - - 79 - - 87 - data_row: [{values: [[114, 101, 97, 100, 32, 99, 111, 109, 109, 105, 116, 116, 101, 100]]}, {values: [[114, 101, 97, 100, 32, 99, 111, 109, 109, 105, 116, 116, 101, 100]]}, {values: [[114, 101, 97, 100, 32, 99, 111, 109, 109, 105, 116, 116, 101, 100]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [116, 114, 97, 110, 115, 97, 99, 116, 105, 111, 110, 95, 105, 115, 111, 108, 97, 116, 105, 111, 110], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: show standard_conforming_strings - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 72 - - 79 - - 87 - data_row: [{values: [[111, 110]]}, {values: [[111, 110]]}, {values: [[111, 110]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 97, 110, 100, 97, 114, 100, 95, 99, 111, 110, 102, 111, 114, 109, 105, 110, 103, 95, 115, 116, 114, 105, 110, 103, 115], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT pg_catalog.pg_class.relname \nFROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace \nWHERE pg_catalog.pg_class.relname = 'students' AND pg_catalog.pg_class.relkind = ANY (ARRAY['r', 'p', 'f', 'v', 'm']) AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid) AND pg_catalog.pg_namespace.nspname != 'pg_catalog'" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{values: [[115, 116, 117, 100, 101, 110, 116, 115]]}, {values: [[115, 116, 117, 100, 101, 110, 116, 115]]}, {values: [[115, 116, 117, 100, 101, 110, 116, 115]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [114, 101, 108, 110, 97, 109, 101], table_oid: 1259, table_attribute_number: 2, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: COMMIT - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 67 - - 79 - - 77 - - 77 - - 73 - - 84 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT students.\"ID\" AS \"students_ID\", students.\"Name\" AS \"students_Name\", students.\"Email\" AS \"students_Email\", students.\"Hashed Password\" AS \"students_Hashed Password\", students.\"Subject Stream\" AS \"students_Subject Stream\" \nFROM students \n LIMIT 100 OFFSET 0" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 48 - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT students.\"ID\" AS \"students_ID\", students.\"Name\" AS \"students_Name\", students.\"Email\" AS \"students_Email\", students.\"Hashed Password\" AS \"students_Hashed Password\", students.\"Subject Stream\" AS \"students_Subject Stream\" \nFROM students \nWHERE students.\"Email\" = 'michaelbrown@example.com' \n LIMIT 1" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 48 - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: INSERT INTO students ("Name", "Email", "Hashed Password", "Subject Stream") VALUES ('Michael Brown', 'michaelbrown@example.com', 'snjdibfmcspxo:::', 'Mathematics') RETURNING students."ID" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 73 - - 78 - - 83 - - 69 - - 82 - - 84 - - 32 - - 48 - - 32 - - 49 - data_row: [{values: [[49]]}, {values: [[49]]}, {values: [[49]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: COMMIT - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 67 - - 79 - - 77 - - 77 - - 73 - - 84 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT students.\"ID\", students.\"Name\", students.\"Email\", students.\"Hashed Password\", students.\"Subject Stream\" \nFROM students \nWHERE students.\"ID\" = 1" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT students.\"ID\" AS \"students_ID\", students.\"Name\" AS \"students_Name\", students.\"Email\" AS \"students_Email\", students.\"Hashed Password\" AS \"students_Hashed Password\", students.\"Subject Stream\" AS \"students_Subject Stream\" \nFROM students \nWHERE students.\"ID\" = 11 \n LIMIT 1" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 48 - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT students.\"ID\" AS \"students_ID\", students.\"Name\" AS \"students_Name\", students.\"Email\" AS \"students_Email\", students.\"Hashed Password\" AS \"students_Hashed Password\", students.\"Subject Stream\" AS \"students_Subject Stream\" \nFROM students \nWHERE students.\"ID\" = 1 \n LIMIT 1" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT students.\"ID\" AS \"students_ID\", students.\"Name\" AS \"students_Name\", students.\"Email\" AS \"students_Email\", students.\"Hashed Password\" AS \"students_Hashed Password\", students.\"Subject Stream\" AS \"students_Subject Stream\" \nFROM students \n LIMIT 100 OFFSET 0" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: "SELECT students.\"ID\" AS \"students_ID\", students.\"Name\" AS \"students_Name\", students.\"Email\" AS \"students_Email\", students.\"Hashed Password\" AS \"students_Hashed Password\", students.\"Subject Stream\" AS \"students_Subject Stream\" \nFROM students \nWHERE students.\"ID\" = 1 \n LIMIT 1" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}, {values: [[49], [77, 105, 99, 104, 97, 101, 108, 32, 66, 114, 111, 119, 110], [109, 105, 99, 104, 97, 101, 108, 98, 114, 111, 119, 110, 64, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109], [115, 110, 106, 100, 105, 98, 102, 109, 99, 115, 112, 120, 111, 58, 58, 58], [77, 97, 116, 104, 101, 109, 97, 116, 105, 99, 115]]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: DELETE FROM students WHERE students."ID" = 1 - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 68 - - 69 - - 76 - - 69 - - 84 - - 69 - - 32 - - 49 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: COMMIT - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 67 - - 79 - - 77 - - 77 - - 73 - - 84 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - identifier: StartupRequest - payload: AAAAKgADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHN0dWRlbnRkYgAA - auth_type: 0 - postgresresponses: - - header: [R] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl: - auth_mechanisms: - - SCRAM-SHA-256 - msg_type: 82 - auth_type: 10 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [p] - identifier: ClientRequest - length: 8 - password_message: - password: SCRAM-SHA-256 - msg_type: 112 - auth_type: 0 - postgresresponses: - - header: [R] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl_continue: {data: [114, 61, 104, 65, 52, 72, 75, 114, 50, 75, 103, 51, 111, 66, 110, 76, 108, 120, 97, 78, 113, 50, 51, 110, 97, 97, 49, 113, 98, 70, 100, 86, 48, 121, 86, 51, 115, 113, 116, 87, 116, 108, 115, 54, 73, 51, 97, 117, 83, 110, 44, 115, 61, 87, 115, 114, 48, 101, 50, 78, 57, 105, 51, 55, 51, 89, 121, 78, 105, 47, 53, 120, 100, 86, 81, 61, 61, 44, 105, 61, 52, 48, 57, 54]} - msg_type: 82 - auth_type: 11 ---- -version: api.keploy.io/v1beta2 -kind: Postgres -name: mocks -spec: - metadata: {} - postgresrequests: - - header: [p] - identifier: ClientRequest - length: 8 - msg_type: 112 - auth_type: 0 - postgresresponses: - - header: [R, R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl_final: {data: [118, 61, 48, 107, 114, 111, 101, 115, 78, 107, 115, 108, 107, 101, 51, 100, 75, 77, 79, 85, 109, 100, 78, 57, 88, 71, 103, 78, 87, 47, 89, 118, 114, 122, 105, 80, 85, 67, 43, 71, 114, 65, 53, 47, 56, 61]} - backend_key_data: - process_id: 54 - secret_key: 1374794602 - parameter_status: - - name: in_hot_standby - value: "off" - - name: integer_datetimes - value: "on" - - name: TimeZone - value: Etc/UTC - - name: IntervalStyle - value: postgres - - name: is_superuser - value: "on" - - name: application_name - value: "" - - name: default_transaction_read_only - value: "off" - - name: scram_iterations - value: "4096" - - name: DateStyle - value: ISO, MDY - - name: standard_conforming_strings - value: "on" - - name: session_authorization - value: postgres - - name: client_encoding - value: UTF8 - - name: server_version - value: 16.0 (Debian 16.0-1.pgdg120+1) - - name: server_encoding - value: UTF8 - - name: server_encoding - value: UTF8 - - name: server_encoding - value: UTF8 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 \ No newline at end of file diff --git a/fastapi-postgres/keploy/test-set-0/tests/test-1.yaml b/fastapi-postgres/keploy/test-set-0/tests/test-1.yaml deleted file mode 100755 index df8342b..0000000 --- a/fastapi-postgres/keploy/test-set-0/tests/test-1.yaml +++ /dev/null @@ -1,45 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-1 -spec: - metadata: {} - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: 1d33acb6-386d-45d1-99db-52329895a032 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 404 - header: - Content-Length: "29" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:02 GMT - Server: uvicorn - body: '{"detail":"Data not found!!"}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - objects: [] - assertions: - noise: - - header.Date - created: 1697621766 -curl: | - curl --request GET \ - --url http://127.0.0.1:8000/students/ \ - --header 'Host: 127.0.0.1:8000' \ - --header 'Accept-Encoding: gzip, deflate, br' \ - --header 'Connection: keep-alive' \ - --header 'User-Agent: PostmanRuntime/7.33.0' \ - --header 'Accept: */*' \ - --header 'Postman-Token: 1d33acb6-386d-45d1-99db-52329895a032' \ diff --git a/fastapi-postgres/keploy/test-set-0/tests/test-2.yaml b/fastapi-postgres/keploy/test-set-0/tests/test-2.yaml deleted file mode 100755 index 810598c..0000000 --- a/fastapi-postgres/keploy/test-set-0/tests/test-2.yaml +++ /dev/null @@ -1,58 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-2 -spec: - metadata: {} - req: - method: POST - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Content-Length: "121" - Content-Type: application/json - Host: 127.0.0.1:8000 - Postman-Token: aba3841e-82f1-489f-9dda-c1c3e3ef3979 - User-Agent: PostmanRuntime/7.33.0 - body: |4- - { - "name": "Michael Brown", - "email": "michaelbrown@example.com", - "password": "michaelbrown999" - } - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "119" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:07 GMT - Server: uvicorn - body: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - objects: [] - assertions: - noise: - - header.Date - created: 1697621770 -curl: |- - curl --request POST \ - --url http://127.0.0.1:8000/students/ \ - --header 'User-Agent: PostmanRuntime/7.33.0' \ - --header 'Accept: */*' \ - --header 'Postman-Token: aba3841e-82f1-489f-9dda-c1c3e3ef3979' \ - --header 'Host: 127.0.0.1:8000' \ - --header 'Accept-Encoding: gzip, deflate, br' \ - --header 'Connection: keep-alive' \ - --header 'Content-Type: application/json' \ - --data ' { - "name": "Michael Brown", - "email": "michaelbrown@example.com", - "password": "michaelbrown999" - }' diff --git a/fastapi-postgres/keploy/test-set-0/tests/test-3.yaml b/fastapi-postgres/keploy/test-set-0/tests/test-3.yaml deleted file mode 100755 index ac81f63..0000000 --- a/fastapi-postgres/keploy/test-set-0/tests/test-3.yaml +++ /dev/null @@ -1,45 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-3 -spec: - metadata: {} - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/11 - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: 4c94cd86-3b39-4fe6-ba34-df66b82fd932 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 404 - header: - Content-Length: "43" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:21 GMT - Server: uvicorn - body: '{"detail":"Student with ID=11 not found!!"}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - objects: [] - assertions: - noise: - - header.Date - created: 1697621784 -curl: | - curl --request GET \ - --url http://127.0.0.1:8000/students/11 \ - --header 'Postman-Token: 4c94cd86-3b39-4fe6-ba34-df66b82fd932' \ - --header 'Host: 127.0.0.1:8000' \ - --header 'Accept-Encoding: gzip, deflate, br' \ - --header 'Connection: keep-alive' \ - --header 'User-Agent: PostmanRuntime/7.33.0' \ - --header 'Accept: */*' \ diff --git a/fastapi-postgres/keploy/test-set-0/tests/test-4.yaml b/fastapi-postgres/keploy/test-set-0/tests/test-4.yaml deleted file mode 100755 index 2abb599..0000000 --- a/fastapi-postgres/keploy/test-set-0/tests/test-4.yaml +++ /dev/null @@ -1,45 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-4 -spec: - metadata: {} - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/1 - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: b46c5b40-375c-4956-bcea-84ef922f77f4 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "119" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:25 GMT - Server: uvicorn - body: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - objects: [] - assertions: - noise: - - header.Date - created: 1697621789 -curl: | - curl --request GET \ - --url http://127.0.0.1:8000/students/1 \ - --header 'User-Agent: PostmanRuntime/7.33.0' \ - --header 'Accept: */*' \ - --header 'Postman-Token: b46c5b40-375c-4956-bcea-84ef922f77f4' \ - --header 'Host: 127.0.0.1:8000' \ - --header 'Accept-Encoding: gzip, deflate, br' \ - --header 'Connection: keep-alive' \ diff --git a/fastapi-postgres/keploy/test-set-0/tests/test-5.yaml b/fastapi-postgres/keploy/test-set-0/tests/test-5.yaml deleted file mode 100755 index dab53d3..0000000 --- a/fastapi-postgres/keploy/test-set-0/tests/test-5.yaml +++ /dev/null @@ -1,45 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-5 -spec: - metadata: {} - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: cdbe1654-026d-4eaa-a059-1f6374a0c4c7 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "121" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:31 GMT - Server: uvicorn - body: '[{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}]' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - objects: [] - assertions: - noise: - - header.Date - created: 1697621794 -curl: | - curl --request GET \ - --url http://127.0.0.1:8000/students/ \ - --header 'User-Agent: PostmanRuntime/7.33.0' \ - --header 'Accept: */*' \ - --header 'Postman-Token: cdbe1654-026d-4eaa-a059-1f6374a0c4c7' \ - --header 'Host: 127.0.0.1:8000' \ - --header 'Accept-Encoding: gzip, deflate, br' \ - --header 'Connection: keep-alive' \ diff --git a/fastapi-postgres/keploy/test-set-0/tests/test-6.yaml b/fastapi-postgres/keploy/test-set-0/tests/test-6.yaml deleted file mode 100755 index c378e76..0000000 --- a/fastapi-postgres/keploy/test-set-0/tests/test-6.yaml +++ /dev/null @@ -1,45 +0,0 @@ -version: api.keploy.io/v1beta2 -kind: Http -name: test-6 -spec: - metadata: {} - req: - method: DELETE - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/1 - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: 4eb76f24-2797-486e-bfda-188164f4611e - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "119" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:38 GMT - Server: uvicorn - body: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - objects: [] - assertions: - noise: - - header.Date - created: 1697621802 -curl: | - curl --request DELETE \ - --url http://127.0.0.1:8000/students/1 \ - --header 'Postman-Token: 4eb76f24-2797-486e-bfda-188164f4611e' \ - --header 'Host: 127.0.0.1:8000' \ - --header 'Accept-Encoding: gzip, deflate, br' \ - --header 'Connection: keep-alive' \ - --header 'User-Agent: PostmanRuntime/7.33.0' \ - --header 'Accept: */*' \ diff --git a/fastapi-postgres/keploy/test-set-1/mocks.yaml b/fastapi-postgres/keploy/test-set-1/mocks.yaml deleted file mode 100755 index 86b47c1..0000000 --- a/fastapi-postgres/keploy/test-set-1/mocks.yaml +++ /dev/null @@ -1,1219 +0,0 @@ -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-0 -spec: - metadata: - type: config - postgresrequests: - - identifier: StartupRequest - length: 8 - payload: AAAACATSFi8= - ssl_request: - is_ssl: true - auth_type: 0 - postgresresponses: - - payload: Tg== - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.216898875Z - restimestampmock: 2024-02-09T10:20:50.218562705Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-1 -spec: - metadata: - type: config - postgresrequests: - - identifier: StartupRequest - payload: AAAAKgADAAB1c2VyAHBvc3RncmVzAGRhdGFiYXNlAHN0dWRlbnRkYgAA - auth_type: 0 - postgresresponses: - - header: [R] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl: - auth_mechanisms: - - SCRAM-SHA-256 - msg_type: 82 - auth_type: 10 - reqtimestampmock: 2024-02-09T10:20:50.232737784Z - restimestampmock: 2024-02-09T10:20:50.233296602Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-2 -spec: - metadata: - type: config - postgresrequests: - - header: [p] - identifier: ClientRequest - length: 8 - password_message: - password: SCRAM-SHA-256 - msg_type: 112 - auth_type: 0 - postgresresponses: - - header: [R] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl_continue: {data: [114, 61, 68, 54, 118, 109, 56, 118, 117, 82, 116, 89, 111, 116, 75, 81, 75, 86, 74, 100, 55, 47, 85, 115, 107, 90, 70, 78, 88, 79, 112, 80, 88, 84, 67, 105, 103, 86, 51, 101, 73, 90, 48, 105, 119, 117, 65, 106, 111, 83, 44, 115, 61, 117, 110, 74, 50, 122, 68, 57, 75, 121, 76, 47, 109, 83, 114, 117, 111, 102, 121, 55, 112, 84, 81, 61, 61, 44, 105, 61, 52, 48, 57, 54]} - msg_type: 82 - auth_type: 11 - reqtimestampmock: 2024-02-09T10:20:50.234459113Z - restimestampmock: 2024-02-09T10:20:50.234488904Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-3 -spec: - metadata: - type: config - postgresrequests: - - header: [p] - identifier: ClientRequest - length: 8 - msg_type: 112 - auth_type: 0 - postgresresponses: - - header: [R, R, S, S, S, S, S, S, S, S, S, S, S, S, S, S, K, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - authentication_sasl_final: {data: [118, 61, 118, 48, 53, 82, 117, 66, 89, 50, 52, 51, 72, 85, 67, 97, 116, 102, 83, 55, 67, 69, 70, 43, 72, 84, 106, 89, 90, 79, 118, 115, 115, 78, 48, 56, 116, 120, 99, 48, 103, 106, 105, 119, 85, 61]} - backend_key_data: - process_id: 34 - secret_key: 4065475156 - parameter_status: - - name: in_hot_standby - value: "off" - - name: integer_datetimes - value: "on" - - name: TimeZone - value: Etc/UTC - - name: IntervalStyle - value: postgres - - name: is_superuser - value: "on" - - name: application_name - value: "" - - name: default_transaction_read_only - value: "off" - - name: scram_iterations - value: "4096" - - name: DateStyle - value: ISO, MDY - - name: standard_conforming_strings - value: "on" - - name: session_authorization - value: postgres - - name: client_encoding - value: UTF8 - - name: server_version - value: 16.1 (Debian 16.1-1.pgdg120+1) - - name: server_encoding - value: UTF8 - - name: server_encoding - value: UTF8 - - name: server_encoding - value: UTF8 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.240419203Z - restimestampmock: 2024-02-09T10:20:50.24047866Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-4 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.241574547Z - restimestampmock: 2024-02-09T10:20:50.241651254Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-5 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - payload: UQAAAHdTRUxFQ1QgdC5vaWQsIHR5cGFycmF5CkZST00gcGdfdHlwZSB0IEpPSU4gcGdfbmFtZXNwYWNlIG5zCiAgICBPTiB0eXBuYW1lc3BhY2UgPSBucy5vaWQKV0hFUkUgdHlwbmFtZSA9ICdoc3RvcmUnOwoA - query: - string: 'SELECT t.oid, typarray FROM pg_type t JOIN pg_namespace ns ON typnamespace = ns.oid WHERE typname = ''hstore''; ' - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 48 - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [111, 105, 100], table_oid: 1247, table_attribute_number: 1, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}, {name: [116, 121, 112, 97, 114, 114, 97, 121], table_oid: 1247, table_attribute_number: 15, data_type_oid: 26, data_type_size: 4, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.243360791Z - restimestampmock: 2024-02-09T10:20:50.243385416Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-6 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.244072772Z - restimestampmock: 2024-02-09T10:20:50.244098563Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-7 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.244693006Z - restimestampmock: 2024-02-09T10:20:50.244715338Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-8 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: select pg_catalog.version() - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAACAAAXZlcnNpb24AAAAAAAAAAAAAGf///////wAARAAAAIMAAQAAAHlQb3N0Z3JlU1FMIDE2LjEgKERlYmlhbiAxNi4xLTEucGdkZzEyMCsxKSBvbiBhYXJjaDY0LXVua25vd24tbGludXgtZ251LCBjb21waWxlZCBieSBnY2MgKERlYmlhbiAxMi4yLjAtMTQpIDEyLjIuMCwgNjQtYml0QwAAAA1TRUxFQ1QgMQBaAAAABVQ= - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{row_values: ['PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit']}, {row_values: ['PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit']}, {row_values: ['PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit']}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [118, 101, 114, 115, 105, 111, 110], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.24516216Z - restimestampmock: 2024-02-09T10:20:50.245191367Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-9 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: select current_schema() - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAACcAAWN1cnJlbnRfc2NoZW1hAAAAAAAAAAAAABMAQP////8AAEQAAAAQAAEAAAAGcHVibGljQwAAAA1TRUxFQ1QgMQBaAAAABVQ= - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{row_values: [public]}, {row_values: [public]}, {row_values: [public]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [99, 117, 114, 114, 101, 110, 116, 95, 115, 99, 104, 101, 109, 97], table_oid: 0, table_attribute_number: 0, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.246241214Z - restimestampmock: 2024-02-09T10:20:50.246281713Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-10 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: show transaction isolation level - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAAC4AAXRyYW5zYWN0aW9uX2lzb2xhdGlvbgAAAAAAAAAAAAAZ////////AABEAAAAGAABAAAADnJlYWQgY29tbWl0dGVkQwAAAAlTSE9XAFoAAAAFVA== - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 72 - - 79 - - 87 - data_row: [{row_values: [read committed]}, {row_values: [read committed]}, {row_values: [read committed]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [116, 114, 97, 110, 115, 97, 99, 116, 105, 111, 110, 95, 105, 115, 111, 108, 97, 116, 105, 111, 110], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.247356559Z - restimestampmock: 2024-02-09T10:20:50.247387933Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-11 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: show standard_conforming_strings - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAADQAAXN0YW5kYXJkX2NvbmZvcm1pbmdfc3RyaW5ncwAAAAAAAAAAAAAZ////////AABEAAAADAABAAAAAm9uQwAAAAlTSE9XAFoAAAAFVA== - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 72 - - 79 - - 87 - data_row: [{row_values: ["on"]}, {row_values: ["on"]}, {row_values: ["on"]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 97, 110, 100, 97, 114, 100, 95, 99, 111, 110, 102, 111, 114, 109, 105, 110, 103, 95, 115, 116, 114, 105, 110, 103, 115], table_oid: 0, table_attribute_number: 0, data_type_oid: 25, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.248114456Z - restimestampmock: 2024-02-09T10:20:50.24815283Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-12 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.248975766Z - restimestampmock: 2024-02-09T10:20:50.24899789Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-13 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.252045225Z - restimestampmock: 2024-02-09T10:20:50.252072266Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-14 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - payload: UQAAAYdTRUxFQ1QgcGdfY2F0YWxvZy5wZ19jbGFzcy5yZWxuYW1lIApGUk9NIHBnX2NhdGFsb2cucGdfY2xhc3MgSk9JTiBwZ19jYXRhbG9nLnBnX25hbWVzcGFjZSBPTiBwZ19jYXRhbG9nLnBnX25hbWVzcGFjZS5vaWQgPSBwZ19jYXRhbG9nLnBnX2NsYXNzLnJlbG5hbWVzcGFjZSAKV0hFUkUgcGdfY2F0YWxvZy5wZ19jbGFzcy5yZWxuYW1lID0gJ3N0dWRlbnRzJyBBTkQgcGdfY2F0YWxvZy5wZ19jbGFzcy5yZWxraW5kID0gQU5ZIChBUlJBWVsncicsICdwJywgJ2YnLCAndicsICdtJ10pIEFORCBwZ19jYXRhbG9nLnBnX3RhYmxlX2lzX3Zpc2libGUocGdfY2F0YWxvZy5wZ19jbGFzcy5vaWQpIEFORCBwZ19jYXRhbG9nLnBnX25hbWVzcGFjZS5uc3BuYW1lICE9ICdwZ19jYXRhbG9nJwA= - query: - string: SELECT pg_catalog.pg_class.relname FROM pg_catalog.pg_class JOIN pg_catalog.pg_namespace ON pg_catalog.pg_namespace.oid = pg_catalog.pg_class.relnamespace WHERE pg_catalog.pg_class.relname = 'students' AND pg_catalog.pg_class.relkind = ANY (ARRAY['r', 'p', 'f', 'v', 'm']) AND pg_catalog.pg_table_is_visible(pg_catalog.pg_class.oid) AND pg_catalog.pg_namespace.nspname != 'pg_catalog' - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAACAAAXJlbG5hbWUAAAAE6wACAAAAEwBA/////wAARAAAABIAAQAAAAhzdHVkZW50c0MAAAANU0VMRUNUIDEAWgAAAAVU - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{row_values: [students]}, {row_values: [students]}, {row_values: [students]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [114, 101, 108, 110, 97, 109, 101], table_oid: 1259, table_attribute_number: 2, data_type_oid: 19, data_type_size: 64, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.253162445Z - restimestampmock: 2024-02-09T10:20:50.253222319Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-15 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: COMMIT - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 67 - - 79 - - 77 - - 77 - - 73 - - 84 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:20:50.254107087Z - restimestampmock: 2024-02-09T10:20:50.25412767Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-16 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:01.542685552Z - restimestampmock: 2024-02-09T10:21:01.542714843Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-17 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - payload: UQAAATBTRUxFQ1Qgc3R1ZGVudHMuIklEIiBBUyAic3R1ZGVudHNfSUQiLCBzdHVkZW50cy4iTmFtZSIgQVMgInN0dWRlbnRzX05hbWUiLCBzdHVkZW50cy4iRW1haWwiIEFTICJzdHVkZW50c19FbWFpbCIsIHN0dWRlbnRzLiJIYXNoZWQgUGFzc3dvcmQiIEFTICJzdHVkZW50c19IYXNoZWQgUGFzc3dvcmQiLCBzdHVkZW50cy4iU3ViamVjdCBTdHJlYW0iIEFTICJzdHVkZW50c19TdWJqZWN0IFN0cmVhbSIgCkZST00gc3R1ZGVudHMgCldIRVJFIHN0dWRlbnRzLiJFbWFpbCIgPSAnZXZhd2hpdGVAZXhhbXBsZS5jb20nIAogTElNSVQgMQA= - query: - string: SELECT students."ID" AS "students_ID", students."Name" AS "students_Name", students."Email" AS "students_Email", students."Hashed Password" AS "students_Hashed Password", students."Subject Stream" AS "students_Subject Stream" FROM students WHERE students."Email" = 'evawhite@example.com' LIMIT 1 - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 48 - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:01.543969268Z - restimestampmock: 2024-02-09T10:21:01.544053057Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-18 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: INSERT INTO students ("Name", "Email", "Hashed Password", "Subject Stream") VALUES ('Eva White', 'evawhite@example.com', 'sfwbxijuf222', 'Mathematics') RETURNING students."ID" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAABsAAUlEAAAAYAEAAQAAABcABP////8AAEQAAAALAAEAAAABMUMAAAAPSU5TRVJUIDAgMQBaAAAABVQ= - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 73 - - 78 - - 83 - - 69 - - 82 - - 84 - - 32 - - 48 - - 32 - - 49 - data_row: [{row_values: ["1"]}, {row_values: ["1"]}, {row_values: ["1"]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:01.546426702Z - restimestampmock: 2024-02-09T10:21:01.546463701Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-19 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: COMMIT - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 67 - - 79 - - 77 - - 77 - - 73 - - 84 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:01.551006372Z - restimestampmock: 2024-02-09T10:21:01.55108062Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-20 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:01.552699118Z - restimestampmock: 2024-02-09T10:21:01.552721743Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-21 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - payload: UQAAAJtTRUxFQ1Qgc3R1ZGVudHMuIklEIiwgc3R1ZGVudHMuIk5hbWUiLCBzdHVkZW50cy4iRW1haWwiLCBzdHVkZW50cy4iSGFzaGVkIFBhc3N3b3JkIiwgc3R1ZGVudHMuIlN1YmplY3QgU3RyZWFtIiAKRlJPTSBzdHVkZW50cyAKV0hFUkUgc3R1ZGVudHMuIklEIiA9IDEA - query: - string: SELECT students."ID", students."Name", students."Email", students."Hashed Password", students."Subject Stream" FROM students WHERE students."ID" = 1 - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAAI0ABUlEAAAAYAEAAQAAABcABP////8AAE5hbWUAAABgAQACAAAEE////////wAARW1haWwAAABgAQADAAAEE////////wAASGFzaGVkIFBhc3N3b3JkAAAAYAEABAAABBP///////8AAFN1YmplY3QgU3RyZWFtAAAAYAEABQAABBP///////8AAEQAAABPAAUAAAABMQAAAAlFdmEgV2hpdGUAAAAUZXZhd2hpdGVAZXhhbXBsZS5jb20AAAAMc2Z3YnhpanVmMjIyAAAAC01hdGhlbWF0aWNzQwAAAA1TRUxFQ1QgMQBaAAAABVQ= - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{row_values: ["1", Eva White, evawhite@example.com, sfwbxijuf222, Mathematics]}, {row_values: ["1", Eva White, evawhite@example.com, sfwbxijuf222, Mathematics]}, {row_values: ["1", Eva White, evawhite@example.com, sfwbxijuf222, Mathematics]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:01.553203147Z - restimestampmock: 2024-02-09T10:21:01.553236062Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-22 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:01.556089153Z - restimestampmock: 2024-02-09T10:21:01.556110861Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-23 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:11.223148624Z - restimestampmock: 2024-02-09T10:21:11.223211164Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-24 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - payload: UQAAAS9TRUxFQ1Qgc3R1ZGVudHMuIklEIiBBUyAic3R1ZGVudHNfSUQiLCBzdHVkZW50cy4iTmFtZSIgQVMgInN0dWRlbnRzX05hbWUiLCBzdHVkZW50cy4iRW1haWwiIEFTICJzdHVkZW50c19FbWFpbCIsIHN0dWRlbnRzLiJIYXNoZWQgUGFzc3dvcmQiIEFTICJzdHVkZW50c19IYXNoZWQgUGFzc3dvcmQiLCBzdHVkZW50cy4iU3ViamVjdCBTdHJlYW0iIEFTICJzdHVkZW50c19TdWJqZWN0IFN0cmVhbSIgCkZST00gc3R1ZGVudHMgCldIRVJFIHN0dWRlbnRzLiJFbWFpbCIgPSAnam9obmRvZUBleGFtcGxlLmNvbScgCiBMSU1JVCAxAA== - query: - string: SELECT students."ID" AS "students_ID", students."Name" AS "students_Name", students."Email" AS "students_Email", students."Hashed Password" AS "students_Hashed Password", students."Subject Stream" AS "students_Subject Stream" FROM students WHERE students."Email" = 'johndoe@example.com' LIMIT 1 - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 48 - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [115, 116, 117, 100, 101, 110, 116, 115, 95, 83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:11.224563961Z - restimestampmock: 2024-02-09T10:21:11.224606043Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-25 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: INSERT INTO students ("Name", "Email", "Hashed Password", "Subject Stream") VALUES ('John Doe', 'johndoe@example.com', 'skpioepf234', 'Mathematics') RETURNING students."ID" - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAABsAAUlEAAAAYAEAAQAAABcABP////8AAEQAAAALAAEAAAABMkMAAAAPSU5TRVJUIDAgMQBaAAAABVQ= - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 73 - - 78 - - 83 - - 69 - - 82 - - 84 - - 32 - - 48 - - 32 - - 49 - data_row: [{row_values: ["2"]}, {row_values: ["2"]}, {row_values: ["2"]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:11.226669655Z - restimestampmock: 2024-02-09T10:21:11.226748861Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-26 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: COMMIT - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 67 - - 79 - - 77 - - 77 - - 73 - - 84 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:11.232155218Z - restimestampmock: 2024-02-09T10:21:11.232190134Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-27 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: BEGIN - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 66 - - 69 - - 71 - - 73 - - 78 - ready_for_query: - txstatus: 84 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:11.233212565Z - restimestampmock: 2024-02-09T10:21:11.233238147Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-28 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - payload: UQAAAJtTRUxFQ1Qgc3R1ZGVudHMuIklEIiwgc3R1ZGVudHMuIk5hbWUiLCBzdHVkZW50cy4iRW1haWwiLCBzdHVkZW50cy4iSGFzaGVkIFBhc3N3b3JkIiwgc3R1ZGVudHMuIlN1YmplY3QgU3RyZWFtIiAKRlJPTSBzdHVkZW50cyAKV0hFUkUgc3R1ZGVudHMuIklEIiA9IDIA - query: - string: SELECT students."ID", students."Name", students."Email", students."Hashed Password", students."Subject Stream" FROM students WHERE students."ID" = 2 - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [T, D, C, Z] - identifier: ServerResponse - length: 8 - payload: VAAAAI0ABUlEAAAAYAEAAQAAABcABP////8AAE5hbWUAAABgAQACAAAEE////////wAARW1haWwAAABgAQADAAAEE////////wAASGFzaGVkIFBhc3N3b3JkAAAAYAEABAAABBP///////8AAFN1YmplY3QgU3RyZWFtAAAAYAEABQAABBP///////8AAEQAAABMAAUAAAABMgAAAAhKb2huIERvZQAAABNqb2huZG9lQGV4YW1wbGUuY29tAAAAC3NrcGlvZXBmMjM0AAAAC01hdGhlbWF0aWNzQwAAAA1TRUxFQ1QgMQBaAAAABVQ= - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 83 - - 69 - - 76 - - 69 - - 67 - - 84 - - 32 - - 49 - data_row: [{row_values: ["2", John Doe, johndoe@example.com, skpioepf234, Mathematics]}, {row_values: ["2", John Doe, johndoe@example.com, skpioepf234, Mathematics]}, {row_values: ["2", John Doe, johndoe@example.com, skpioepf234, Mathematics]}] - ready_for_query: - txstatus: 84 - row_description: {fields: [{name: [73, 68], table_oid: 24577, table_attribute_number: 1, data_type_oid: 23, data_type_size: 4, type_modifier: -1, format: 0}, {name: [78, 97, 109, 101], table_oid: 24577, table_attribute_number: 2, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [69, 109, 97, 105, 108], table_oid: 24577, table_attribute_number: 3, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [72, 97, 115, 104, 101, 100, 32, 80, 97, 115, 115, 119, 111, 114, 100], table_oid: 24577, table_attribute_number: 4, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}, {name: [83, 117, 98, 106, 101, 99, 116, 32, 83, 116, 114, 101, 97, 109], table_oid: 24577, table_attribute_number: 5, data_type_oid: 1043, data_type_size: -1, type_modifier: -1, format: 0}]} - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:11.233889547Z - restimestampmock: 2024-02-09T10:21:11.233922754Z ---- -version: api.keploy.io/v1beta1 -kind: Postgres -name: mock-29 -spec: - metadata: - type: config - postgresrequests: - - header: [Q] - identifier: ClientRequest - length: 8 - query: - string: ROLLBACK - msg_type: 81 - auth_type: 0 - postgresresponses: - - header: [C, Z] - identifier: ServerResponse - length: 8 - authentication_md5_password: - salt: - - 0 - - 0 - - 0 - - 0 - command_complete: - - command_tag: - - 82 - - 79 - - 76 - - 76 - - 66 - - 65 - - 67 - - 75 - ready_for_query: - txstatus: 73 - msg_type: 90 - auth_type: 0 - reqtimestampmock: 2024-02-09T10:21:11.236845177Z - restimestampmock: 2024-02-09T10:21:11.236868259Z diff --git a/fastapi-postgres/keploy/test-set-1/tests/test-1.yaml b/fastapi-postgres/keploy/test-set-1/tests/test-1.yaml deleted file mode 100755 index e5100d2..0000000 --- a/fastapi-postgres/keploy/test-set-1/tests/test-1.yaml +++ /dev/null @@ -1,55 +0,0 @@ -version: api.keploy.io/v1beta1 -kind: Http -name: test-1 -spec: - metadata: {} - req: - method: POST - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Content-Length: "105" - Content-Type: application/json - Host: 127.0.0.1:8000 - User-Agent: curl/8.2.1 - body: |- - { - "name": "Eva White", - "email": "evawhite@example.com", - "password": "evawhite111" - } - body_type: "" - timestamp: 2024-02-09T10:21:01.532943145Z - host: "" - resp: - status_code: 200 - header: - Content-Length: "107" - Content-Type: application/json - Date: Fri, 09 Feb 2024 10:21:00 GMT - Server: uvicorn - body: '{"name":"Eva White","email":"evawhite@example.com","password":"sfwbxijuf222","stream":"Mathematics","id":1}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - timestamp: 2024-02-09T10:21:03.574647019Z - objects: [] - assertions: - noise: - header.Date: [] - created: 1707474063 -curl: |- - curl --request POST \ - --url http://127.0.0.1:8000/students/ \ - --header 'Host: 127.0.0.1:8000' \ - --header 'User-Agent: curl/8.2.1' \ - --header 'Accept: */*' \ - --header 'Content-Type: application/json' \ - --data '{ - "name": "Eva White", - "email": "evawhite@example.com", - "password": "evawhite111" - }' diff --git a/fastapi-postgres/keploy/test-set-1/tests/test-2.yaml b/fastapi-postgres/keploy/test-set-1/tests/test-2.yaml deleted file mode 100755 index ecddaf6..0000000 --- a/fastapi-postgres/keploy/test-set-1/tests/test-2.yaml +++ /dev/null @@ -1,55 +0,0 @@ -version: api.keploy.io/v1beta1 -kind: Http -name: test-2 -spec: - metadata: {} - req: - method: POST - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Content-Length: "106" - Content-Type: application/json - Host: 127.0.0.1:8000 - User-Agent: curl/8.2.1 - body: |4- - { - "name": "John Doe", - "email": "johndoe@example.com", - "password": "johndoe123" - } - body_type: "" - timestamp: 2024-02-09T10:21:11.21894436Z - host: "" - resp: - status_code: 200 - header: - Content-Length: "104" - Content-Type: application/json - Date: Fri, 09 Feb 2024 10:21:10 GMT - Server: uvicorn - body: '{"name":"John Doe","email":"johndoe@example.com","password":"skpioepf234","stream":"Mathematics","id":2}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - timestamp: 2024-02-09T10:21:13.238027535Z - objects: [] - assertions: - noise: - header.Date: [] - created: 1707474073 -curl: |- - curl --request POST \ - --url http://127.0.0.1:8000/students/ \ - --header 'User-Agent: curl/8.2.1' \ - --header 'Accept: */*' \ - --header 'Content-Type: application/json' \ - --header 'Host: 127.0.0.1:8000' \ - --data ' { - "name": "John Doe", - "email": "johndoe@example.com", - "password": "johndoe123" - }' diff --git a/fastapi-postgres/keploy/testReports/report-1.yaml b/fastapi-postgres/keploy/testReports/report-1.yaml deleted file mode 100755 index 6ec8809..0000000 --- a/fastapi-postgres/keploy/testReports/report-1.yaml +++ /dev/null @@ -1,519 +0,0 @@ -version: api.keploy.io/v1beta1 -name: report-21 -status: PASSED -success: 6 -failure: 0 -total: 6 -tests: - - kind: Http - name: report-21 - status: PASSED - started: 1697621960 - completed: 1697621960 - test_case_path: /home/shashwat/Projects/fastapi-postgres/keploy/test-set-3 - mock_path: "" - test_case_id: test-1 - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: 1d33acb6-386d-45d1-99db-52329895a032 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 404 - header: - Content-Length: "29" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:02 GMT - Server: uvicorn - body: '{"detail":"Data not found!!"}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - noise: - - header.Date - result: - status_code: - normal: true - expected: 404 - actual: 404 - headers_result: - - normal: true - expected: - key: Content-Length - value: - - "29" - actual: - key: Content-Length - value: - - "29" - - normal: true - expected: - key: Content-Type - value: - - application/json - actual: - key: Content-Type - value: - - application/json - - normal: true - expected: - key: Date - value: - - Wed, 18 Oct 2023 09:36:02 GMT - actual: - key: Date - value: - - Wed, 18 Oct 2023 09:39:19 GMT - - normal: true - expected: - key: Server - value: - - uvicorn - actual: - key: Server - value: - - uvicorn - body_result: - - normal: true - type: JSON - expected: '{"detail":"Data not found!!"}' - actual: '{"detail":"Data not found!!"}' - dep_result: [] - - kind: Http - name: report-21 - status: PASSED - started: 1697621960 - completed: 1697621960 - test_case_path: /home/shashwat/Projects/fastapi-postgres/keploy/test-set-3 - mock_path: "" - test_case_id: test-2 - req: - method: POST - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Content-Length: "121" - Content-Type: application/json - Host: 127.0.0.1:8000 - Postman-Token: aba3841e-82f1-489f-9dda-c1c3e3ef3979 - User-Agent: PostmanRuntime/7.33.0 - body: |4- - { - "name": "Michael Brown", - "email": "michaelbrown@example.com", - "password": "michaelbrown999" - } - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "119" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:07 GMT - Server: uvicorn - body: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - noise: - - header.Date - result: - status_code: - normal: true - expected: 200 - actual: 200 - headers_result: - - normal: true - expected: - key: Content-Length - value: - - "119" - actual: - key: Content-Length - value: - - "119" - - normal: true - expected: - key: Content-Type - value: - - application/json - actual: - key: Content-Type - value: - - application/json - - normal: true - expected: - key: Date - value: - - Wed, 18 Oct 2023 09:36:07 GMT - actual: - key: Date - value: - - Wed, 18 Oct 2023 09:39:19 GMT - - normal: true - expected: - key: Server - value: - - uvicorn - actual: - key: Server - value: - - uvicorn - body_result: - - normal: true - type: JSON - expected: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - actual: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - dep_result: [] - - kind: Http - name: report-21 - status: PASSED - started: 1697621960 - completed: 1697621960 - test_case_path: /home/shashwat/Projects/fastapi-postgres/keploy/test-set-3 - mock_path: "" - test_case_id: test-3 - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/11 - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: 4c94cd86-3b39-4fe6-ba34-df66b82fd932 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 404 - header: - Content-Length: "43" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:21 GMT - Server: uvicorn - body: '{"detail":"Student with ID=11 not found!!"}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - noise: - - header.Date - result: - status_code: - normal: true - expected: 404 - actual: 404 - headers_result: - - normal: true - expected: - key: Content-Length - value: - - "43" - actual: - key: Content-Length - value: - - "43" - - normal: true - expected: - key: Content-Type - value: - - application/json - actual: - key: Content-Type - value: - - application/json - - normal: true - expected: - key: Date - value: - - Wed, 18 Oct 2023 09:36:21 GMT - actual: - key: Date - value: - - Wed, 18 Oct 2023 09:39:20 GMT - - normal: true - expected: - key: Server - value: - - uvicorn - actual: - key: Server - value: - - uvicorn - body_result: - - normal: true - type: JSON - expected: '{"detail":"Student with ID=11 not found!!"}' - actual: '{"detail":"Student with ID=11 not found!!"}' - dep_result: [] - - kind: Http - name: report-21 - status: PASSED - started: 1697621960 - completed: 1697621960 - test_case_path: /home/shashwat/Projects/fastapi-postgres/keploy/test-set-3 - mock_path: "" - test_case_id: test-4 - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/1 - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: b46c5b40-375c-4956-bcea-84ef922f77f4 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "119" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:25 GMT - Server: uvicorn - body: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - noise: - - header.Date - result: - status_code: - normal: true - expected: 200 - actual: 200 - headers_result: - - normal: true - expected: - key: Content-Length - value: - - "119" - actual: - key: Content-Length - value: - - "119" - - normal: true - expected: - key: Content-Type - value: - - application/json - actual: - key: Content-Type - value: - - application/json - - normal: true - expected: - key: Date - value: - - Wed, 18 Oct 2023 09:36:25 GMT - actual: - key: Date - value: - - Wed, 18 Oct 2023 09:39:20 GMT - - normal: true - expected: - key: Server - value: - - uvicorn - actual: - key: Server - value: - - uvicorn - body_result: - - normal: true - type: JSON - expected: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - actual: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - dep_result: [] - - kind: Http - name: report-21 - status: PASSED - started: 1697621960 - completed: 1697621960 - test_case_path: /home/shashwat/Projects/fastapi-postgres/keploy/test-set-3 - mock_path: "" - test_case_id: test-5 - req: - method: GET - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/ - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: cdbe1654-026d-4eaa-a059-1f6374a0c4c7 - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "121" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:31 GMT - Server: uvicorn - body: '[{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}]' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - noise: - - header.Date - result: - status_code: - normal: true - expected: 200 - actual: 200 - headers_result: - - normal: true - expected: - key: Date - value: - - Wed, 18 Oct 2023 09:36:31 GMT - actual: - key: Date - value: - - Wed, 18 Oct 2023 09:39:20 GMT - - normal: true - expected: - key: Server - value: - - uvicorn - actual: - key: Server - value: - - uvicorn - - normal: true - expected: - key: Content-Length - value: - - "121" - actual: - key: Content-Length - value: - - "121" - - normal: true - expected: - key: Content-Type - value: - - application/json - actual: - key: Content-Type - value: - - application/json - body_result: - - normal: true - type: JSON - expected: '[{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}]' - actual: '[{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}]' - dep_result: [] - - kind: Http - name: report-21 - status: PASSED - started: 1697621960 - completed: 1697621960 - test_case_path: /home/shashwat/Projects/fastapi-postgres/keploy/test-set-3 - mock_path: "" - test_case_id: test-6 - req: - method: DELETE - proto_major: 1 - proto_minor: 1 - url: http://127.0.0.1:8000/students/1 - header: - Accept: '*/*' - Accept-Encoding: gzip, deflate, br - Connection: keep-alive - Host: 127.0.0.1:8000 - Postman-Token: 4eb76f24-2797-486e-bfda-188164f4611e - User-Agent: PostmanRuntime/7.33.0 - body: "" - body_type: "" - resp: - status_code: 200 - header: - Content-Length: "119" - Content-Type: application/json - Date: Wed, 18 Oct 2023 09:36:38 GMT - Server: uvicorn - body: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - body_type: "" - status_message: "" - proto_major: 0 - proto_minor: 0 - noise: - - header.Date - result: - status_code: - normal: true - expected: 200 - actual: 200 - headers_result: - - normal: true - expected: - key: Content-Type - value: - - application/json - actual: - key: Content-Type - value: - - application/json - - normal: true - expected: - key: Date - value: - - Wed, 18 Oct 2023 09:36:38 GMT - actual: - key: Date - value: - - Wed, 18 Oct 2023 09:39:20 GMT - - normal: true - expected: - key: Server - value: - - uvicorn - actual: - key: Server - value: - - uvicorn - - normal: true - expected: - key: Content-Length - value: - - "119" - actual: - key: Content-Length - value: - - "119" - body_result: - - normal: true - type: JSON - expected: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - actual: '{"name":"Michael Brown","email":"michaelbrown@example.com","password":"snjdibfmcspxo:::","stream":"Mathematics","id":1}' - dep_result: [] -test_set: test-set-3 diff --git a/fastapi-postgres/sql/init.sql b/fastapi-postgres/sql/init.sql index aaa55f3..c42858b 100644 --- a/fastapi-postgres/sql/init.sql +++ b/fastapi-postgres/sql/init.sql @@ -1,2 +1,2 @@ -DROP DATABASE studentdb IF EXISTS; -CREATE DATABASE studentdb; \ No newline at end of file +CREATE DATABASE studentdb; +DROP DATABASE IF EXISTS studentdb; \ No newline at end of file diff --git a/fastapi-twilio/README.md b/fastapi-twilio/README.md index 06bbc82..0afbc7e 100644 --- a/fastapi-twilio/README.md +++ b/fastapi-twilio/README.md @@ -13,25 +13,11 @@ pip3 install -r requirements.txt Keploy can be installed on Linux directly and on Windows with the help of WSL. Based on your system architecture, install the keploy latest binary release -**1. AMD Architecture** - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy -``` - -
- 2. ARM Architecture - -```shell -curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz" | tar xz -C /tmp - -sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin && keploy +```bash + curl -O https://raw.githubusercontent.com/keploy/keploy/main/keploy.sh && source keploy.sh + keploy ``` -
- ### Get your Twilio Credentials You can get your Twilio credentials by signing in to [Twilio Console](https://console.twilio.com/). diff --git a/flask-mongo/README.md b/flask-mongo/README.md index 8080c5f..bfe5c60 100644 --- a/flask-mongo/README.md +++ b/flask-mongo/README.md @@ -1,7 +1,7 @@ This application is a simple student management API built using Python's Flask framework and MongoDB for data storage. It allows you to perform basic CRUD (Create, Read, Update, Delete) operations on student records. The API supports CORS (Cross-Origin Resource Sharing) to facilitate cross-domain requests. -Usage: +### Usage: 1. Get List of Students: Retrieve a list of all students. ``` From 1195b762fe8bf9e222de57676ceb1bb0bb84c4c5 Mon Sep 17 00:00:00 2001 From: Animesh pathak Date: Mon, 4 Mar 2024 06:08:38 +0000 Subject: [PATCH 3/3] fix: docker and readme instruction Signed-off-by: Animesh pathak --- fastapi-postgres/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastapi-postgres/README.md b/fastapi-postgres/README.md index d902662..eca7442 100644 --- a/fastapi-postgres/README.md +++ b/fastapi-postgres/README.md @@ -32,6 +32,8 @@ Keploy can be installed on Linux directly and on Windows with the help of WSL. B docker-compose up -d ``` +> Note: Update the `SQLALCHEMY_DATABASE_URL` in the `database.py` file if you want to use a keploy with docker. + ### Capture the Testcases This command will start the recording of API calls using ebpf:-