1. Prometheus Research, LLC
  2. Prometheus
  3. htsql

Source

htsql / test / input / oracle.yaml

#
# Copyright (c) 2006-2013, Prometheus Research, LLC
#

title: Oracle regression tests
suite: oracle
output: test/output/oracle.yaml
tests:

- title: Remove any existing regression database
  suite: dropdb
  tests:
  - connect: &connect-admin
      engine: oracle
      database: ${ORACLE_SID:XE}
      username: ${ORACLE_USERNAME}
      password: ${ORACLE_PASSWORD}
      host: ${ORACLE_HOST}
      port: ${ORACLE_PORT}
    sql: |
        DROP USER htsql_demo CASCADE;
    autocommit: true
    ignore: true
  - connect: *connect-admin
    sql: |
        DROP USER htsql_edge CASCADE;
    autocommit: true
    ignore: true
  - connect: *connect-admin
    sql: |
        DROP USER htsql_sandbox CASCADE;
    autocommit: true
    ignore: true

- title: Deploy the regression database
  suite: createdb
  tests:
  # Create the `demo` database
  - connect: *connect-admin
    sql: |
        CREATE USER htsql_demo IDENTIFIED BY secret;
        GRANT CREATE SESSION TO htsql_demo;
        GRANT CREATE TABLE TO htsql_demo;
        GRANT CREATE SEQUENCE TO htsql_demo;
        GRANT CREATE TRIGGER TO htsql_demo;
        GRANT UNLIMITED TABLESPACE TO htsql_demo;
    autocommit: true
  - connect: &connect-demo
      engine: oracle
      database: ${ORACLE_SID:XE}
      username: htsql_demo
      password: secret
      host: ${ORACLE_HOST}
      port: ${ORACLE_PORT}
    sql: test/sql/demo-oracle.sql
  - db: *connect-demo
  - py: test/sql/demo-load.py
  # Create the `edge` database
  - connect: *connect-admin
    sql: |
        CREATE USER htsql_edge IDENTIFIED BY secret;
        GRANT CREATE SESSION TO htsql_edge;
        GRANT CREATE TABLE TO htsql_edge;
        GRANT CREATE SEQUENCE TO htsql_edge;
        GRANT CREATE TRIGGER TO htsql_edge;
        GRANT UNLIMITED TABLESPACE TO htsql_edge;
    autocommit: true
  - connect: &connect-edge
      engine: oracle
      database: ${ORACLE_SID:XE}
      username: htsql_edge
      password: secret
      host: ${ORACLE_HOST}
      port: ${ORACLE_PORT}
    sql: test/sql/edge-oracle.sql
  # Create the `sandbox` database
  - connect: *connect-admin
    sql: |
        CREATE USER htsql_sandbox IDENTIFIED BY secret;
        GRANT CREATE SESSION TO htsql_sandbox;
        GRANT CREATE TABLE TO htsql_sandbox;
        GRANT CREATE SEQUENCE TO htsql_sandbox;
        GRANT CREATE TRIGGER TO htsql_sandbox;
        GRANT UNLIMITED TABLESPACE TO htsql_sandbox;
    autocommit: true
  - connect: &connect-sandbox
      engine: oracle
      database: ${ORACLE_SID:XE}
      username: htsql_sandbox
      password: secret
      host: ${ORACLE_HOST}
      port: ${ORACLE_PORT}
    sql: |
        -- The `sandbox` database is populated by the tests.

- title: Run the test collection
  suite: test
  tests:
  - set: oracle
  - db: *connect-sandbox
    extensions:
      htsql: {debug: true}
      tweak.pool: {}
    save: sandbox
  - db: *connect-edge
    extensions:
      htsql: {debug: true}
      tweak.pool: {}
    save: edge
  - db: *connect-demo
    extensions:
      htsql: {debug: true}
      tweak.pool: {}
    save: demo
  # The Regression Schema
  - include: test/input/schema.yaml
  # Examples from the Tutorial
  - include: test/input/tutorial.yaml
  # Standard Data Types, Functions, and Operations
  - include: test/input/library.yaml
  # Edge Cases of HTSQL-to-SQL Translation
  - include: test/input/translation.yaml
  # Formatting Output Data
  - include: test/input/format.yaml
  # Extensions
  - include: test/input/addon.yaml
  # Error Reporting
  - include: test/input/error.yaml
  # Embedding HTSQL
  - include: test/input/embedding.yaml