stub@aargh:~/charms/postgresql/rewrite$ make test sudo add-apt-repository -y ppa:juju/stable gpg: keyring `/tmp/tmppv9t1ria/secring.gpg' created gpg: keyring `/tmp/tmppv9t1ria/pubring.gpg' created gpg: requesting key C8068B11 from hkp server keyserver.ubuntu.com gpg: /tmp/tmppv9t1ria/trustdb.gpg: trustdb created gpg: key C8068B11: public key "Launchpad Ensemble PPA" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK sudo add-apt-repository -y ppa:stub/juju gpg: keyring `/tmp/tmpfkk5hwu_/secring.gpg' created gpg: keyring `/tmp/tmpfkk5hwu_/pubring.gpg' created gpg: requesting key E4FD7A7A from hkp server keyserver.ubuntu.com gpg: /tmp/tmpfkk5hwu_/trustdb.gpg: trustdb created gpg: key E4FD7A7A: public key "Launchpad Stub's Launchpad PPA" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK [...] Reading package lists... Done sudo apt-get install -y \ python3-psycopg2 python3-nose python3-flake8 amulet \ python3-jinja2 python3-yaml juju-wait bzr \ python3-nose-cov python3-nose-timer python-swiftclient Reading package lists... Done Building dependency tree Reading state information... Done bzr is already the newest version. python-swiftclient is already the newest version. python3-flake8 is already the newest version. python3-jinja2 is already the newest version. python3-nose is already the newest version. python3-psycopg2 is already the newest version. python3-yaml is already the newest version. python3-nose-cov is already the newest version. python3-nose-timer is already the newest version. amulet is already the newest version. juju-wait is already the newest version. 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. Charm Proof I: metadata name (postgresql) must match directory name (rewrite) exactly for local deployment. Lint check (flake8) user configuration: /home/stub/.config/flake8 directory hooks checking hooks/bootstrap.py checking hooks/client.py checking hooks/coordinator.py checking hooks/decorators.py checking hooks/definitions.py checking hooks/helpers.py checking hooks/metrics.py checking hooks/nagios.py checking hooks/postgresql.py checking hooks/replication.py checking hooks/service.py checking hooks/storage.py checking hooks/syslogrel.py checking hooks/upgrade.py checking hooks/wal_e.py directory actions checking actions/actions.py directory testing checking testing/__init__.py checking testing/amuletfixture.py directory tests checking tests/obsolete.py checking tests/test_integration.py checking tests/test_postgresql.py nosetests3 -sv tests/test_postgresql.py --cover-package=bootstrap,nagios,wal_e,syslogrel,replication,definitions,storage,decorators,metrics,upgrade,postgresql,helpers,coordinator,client,service \ --with-coverage --cover-branches test_addr_to_range (test_postgresql.TestPostgresql) ... ok test_connect (test_postgresql.TestPostgresql) ... ok test_convert_unit (test_postgresql.TestPostgresql) ... ok test_create_cluster (test_postgresql.TestPostgresql) ... ok test_drop_cluster (test_postgresql.TestPostgresql) ... ok test_ensure_database (test_postgresql.TestPostgresql) ... ok test_ensure_extensions (test_postgresql.TestPostgresql) ... ok test_ensure_role (test_postgresql.TestPostgresql) ... ok test_ensure_user (test_postgresql.TestPostgresql) ... ok test_grant_database_privileges (test_postgresql.TestPostgresql) ... ok test_grant_user_roles (test_postgresql.TestPostgresql) ... ok test_has_version (test_postgresql.TestPostgresql) ... ok test_inhibit_default_cluster_creation (test_postgresql.TestPostgresql) ... ok test_is_in_recovery (test_postgresql.TestPostgresql) ... ok test_is_primary (test_postgresql.TestPostgresql) ... ok test_is_running (test_postgresql.TestPostgresql) ... ok test_is_running_91 (test_postgresql.TestPostgresql) ... ok test_is_secondary (test_postgresql.TestPostgresql) ... ok test_packages (test_postgresql.TestPostgresql) ... ok test_parse_config (test_postgresql.TestPostgresql) ... ok test_pgidentifier (test_postgresql.TestPostgresql) ... ok test_port (test_postgresql.TestPostgresql) ... ok test_quote_identifier (test_postgresql.TestPostgresql) ... ok test_reload_config (test_postgresql.TestPostgresql) ... ok test_role_exists (test_postgresql.TestPostgresql) ... ok test_simple_paths (test_postgresql.TestPostgresql) ... ok test_start (test_postgresql.TestPostgresql) ... ok test_stop (test_postgresql.TestPostgresql) ... ok test_username (test_postgresql.TestPostgresql) ... ok test_version (test_postgresql.TestPostgresql) ... ok Coverage.py warning: Module bootstrap was never imported. Coverage.py warning: Module nagios was never imported. Coverage.py warning: Module syslogrel was never imported. Coverage.py warning: Module replication was never imported. Coverage.py warning: Module definitions was never imported. Coverage.py warning: Module storage was never imported. Coverage.py warning: Module metrics was never imported. Coverage.py warning: Module upgrade was never imported. Coverage.py warning: Module client was never imported. Coverage.py warning: Module service was never imported. Name Stmts Miss Branch BrMiss Cover Missing --------------------------------------------------------- coordinator 2 0 0 0 100% decorators 62 43 20 20 23% 29-36, 47, 50-58, 67-78, 85-88, 94-100, 105-112, 117-124 helpers 79 54 12 12 27% 32-43, 48, 52-62, 67-68, 73-74, 82-92, 96-101, 107-112, 116-118, 122-127, 132, 137, 142, 147, 151 postgresql 313 17 105 13 93% 48, 52, 557, 662-663, 666, 671-672, 676-692 wal_e 50 31 16 16 29% 30-31, 36, 46-89, 91, 97, 102-103, 108, 112, 116, 121-122, 128-129 --------------------------------------------------------- TOTAL 506 145 153 61 69% ---------------------------------------------------------------------- Ran 30 tests in 0.051s OK OK: Unit tests pass Thu Sep 24 17:01:34 ICT 2015 nosetests3 -sv --with-timer tests/test_integration.py test_admin_addresses (test_integration.PG91MultiTests) ... ok test_db_admin_relation (test_integration.PG91MultiTests) ... ok test_db_relation (test_integration.PG91MultiTests) ... ok test_explicit_database (test_integration.PG91MultiTests) ... ok test_failover (test_integration.PG91MultiTests) ... ok test_replication (test_integration.PG91MultiTests) ... ok test_wal_e_swift_logshipping (test_integration.PG91MultiTests) ... ok test_admin_addresses (test_integration.PG91Tests) ... ok test_db_admin_relation (test_integration.PG91Tests) ... ok test_db_relation (test_integration.PG91Tests) ... ok test_explicit_database (test_integration.PG91Tests) ... ok test_admin_addresses (test_integration.PG92MultiTests) ... ok test_db_admin_relation (test_integration.PG92MultiTests) ... ok test_db_relation (test_integration.PG92MultiTests) ... ok test_explicit_database (test_integration.PG92MultiTests) ... ok test_admin_addresses (test_integration.PG92Tests) ... ok test_db_admin_relation (test_integration.PG92Tests) ... ok test_db_relation (test_integration.PG92Tests) ... ok test_explicit_database (test_integration.PG92Tests) ... ok test_admin_addresses (test_integration.PG93MultiTests) ... ok test_db_admin_relation (test_integration.PG93MultiTests) ... ok test_db_relation (test_integration.PG93MultiTests) ... ok test_explicit_database (test_integration.PG93MultiTests) ... ok test_failover (test_integration.PG93MultiTests) ... ok test_replication (test_integration.PG93MultiTests) ... ok test_wal_e_swift_logshipping (test_integration.PG93MultiTests) ... ok test_admin_addresses (test_integration.PG93Tests) ... ok test_db_admin_relation (test_integration.PG93Tests) ... ok test_db_relation (test_integration.PG93Tests) ... ok test_explicit_database (test_integration.PG93Tests) ... ok test_admin_addresses (test_integration.PG94MultiTests) ... ok test_db_admin_relation (test_integration.PG94MultiTests) ... ok test_db_relation (test_integration.PG94MultiTests) ... ok test_explicit_database (test_integration.PG94MultiTests) ... ok test_failover (test_integration.PG94MultiTests) ... ok test_replication (test_integration.PG94MultiTests) ... ok test_wal_e_swift_logshipping (test_integration.PG94MultiTests) ... ok test_admin_addresses (test_integration.PG94Tests) ... ok test_db_admin_relation (test_integration.PG94Tests) ... ok test_db_relation (test_integration.PG94Tests) ... ok test_explicit_database (test_integration.PG94Tests) ... ok test_admin_addresses (test_integration.UpgradedCharmTests) ... ok test_db_admin_relation (test_integration.UpgradedCharmTests) ... ok test_db_relation (test_integration.UpgradedCharmTests) ... ok test_explicit_database (test_integration.UpgradedCharmTests) ... ok test_username (test_integration.UpgradedCharmTests) ... ok test_integration.PG94MultiTests.test_wal_e_swift_logshipping: 409.9076s test_integration.PG93MultiTests.test_failover: 337.9814s test_integration.PG94MultiTests.test_failover: 307.4820s test_integration.PG91MultiTests.test_wal_e_swift_logshipping: 297.4301s test_integration.PG93MultiTests.test_wal_e_swift_logshipping: 281.9260s test_integration.PG91MultiTests.test_failover: 270.4920s test_integration.PG94MultiTests.test_db_admin_relation: 149.4926s test_integration.PG94MultiTests.test_explicit_database: 134.1316s test_integration.PG91MultiTests.test_explicit_database: 116.0756s test_integration.PG93MultiTests.test_explicit_database: 114.8773s test_integration.PG93MultiTests.test_db_admin_relation: 97.6805s test_integration.UpgradedCharmTests.test_explicit_database: 88.9844s test_integration.UpgradedCharmTests.test_db_admin_relation: 88.0383s test_integration.PG92MultiTests.test_explicit_database: 86.1275s test_integration.PG92Tests.test_admin_addresses: 86.0466s test_integration.PG92Tests.test_explicit_database: 82.1324s test_integration.PG92MultiTests.test_admin_addresses: 81.2744s test_integration.PG91MultiTests.test_admin_addresses: 81.2531s test_integration.PG93MultiTests.test_admin_addresses: 80.6862s test_integration.UpgradedCharmTests.test_admin_addresses: 80.4790s test_integration.PG94MultiTests.test_admin_addresses: 77.1300s test_integration.PG91Tests.test_admin_addresses: 76.3121s test_integration.PG94Tests.test_admin_addresses: 76.2519s test_integration.PG93Tests.test_explicit_database: 74.1410s test_integration.PG94MultiTests.test_replication: 73.4639s test_integration.PG91Tests.test_explicit_database: 73.1294s test_integration.PG94Tests.test_explicit_database: 72.5367s test_integration.PG94MultiTests.test_db_relation: 72.3324s test_integration.PG91MultiTests.test_db_admin_relation: 71.5321s test_integration.PG93Tests.test_admin_addresses: 70.9535s test_integration.PG92Tests.test_db_admin_relation: 57.7580s test_integration.PG93MultiTests.test_db_relation: 55.0824s test_integration.PG93MultiTests.test_replication: 54.4945s test_integration.PG91Tests.test_db_admin_relation: 50.2363s test_integration.PG93Tests.test_db_admin_relation: 48.6482s test_integration.PG91MultiTests.test_db_relation: 43.7072s test_integration.PG91MultiTests.test_replication: 43.1237s test_integration.PG94Tests.test_db_admin_relation: 42.5321s test_integration.PG92MultiTests.test_db_admin_relation: 41.1497s test_integration.UpgradedCharmTests.test_db_relation: 38.5307s test_integration.UpgradedCharmTests.test_username: 35.8599s test_integration.PG92MultiTests.test_db_relation: 28.3451s test_integration.PG94Tests.test_db_relation: 27.7341s test_integration.PG92Tests.test_db_relation: 22.0276s test_integration.PG93Tests.test_db_relation: 21.6873s test_integration.PG91Tests.test_db_relation: 17.7395s ---------------------------------------------------------------------- Ran 46 tests in 7590.070s OK OK: Integration tests pass Thu Sep 24 19:08:04 ICT 2015