Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A api
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • ironapi
  • api
  • Wiki
  • Dev
  • Testing

Last edited by Andrea Pavlovic May 25, 2021
Page history

Testing

Current plan: have two docker images for testing - one with the db and one with the gw.

Then run tests in /ironapi-gw/t against that setup.

!/bin/bash
# APIKEY for root tests: 
APIKEY=5b3d776d-f6cd-4f49-9b88-a8e38c197d9e
DBHOST=46.101.130.36 
DBUSER=root
#terminate all connections before trying to drop the database
psql -h $DBHOST -Atqc "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'test'" template1 $DBUSER
# wait a moment for all connections to be terminated
sleep 2
#drop the database
dropdb --if-exists -U postgres   -h 46.101.130.36 test
#create a new copy of the genesis core
createdb -U postgres -T genesis -O postgres -h 46.101.130.36 test
Clone repository
  • API
    • Available Endpoints
    • Changing Passwords
    • Form Input Types
    • Introduction
    • Logout
    • Plugins
    • Queries
    • Queries
      • Attributes
      • Context
      • Query Examples
      • Query Search Options
      • Referenced Instances
      • Saved Queries
    • Schema_Changes
    • Storing Files
View All Pages