Skip to content

PBM-1466 - Remove kingpin dependency from pbm cli #25

PBM-1466 - Remove kingpin dependency from pbm cli

PBM-1466 - Remove kingpin dependency from pbm cli #25

GitHub Actions / JUnit Test Report failed Jan 8, 2025 in 0s

23 tests run, 22 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 123 in psmdb-testing/pbm-functional/pytest/test_PBM-1355.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_PBM-1355.test_remap_PBM_T265[physical]

AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f8a52c37350>, exit_status=1, command=b'pbm config --force-resync --out json', _stdout=b'', _stderr=b'Error: another operation in progress, Resync storage/677eee51b0abc0d3d61c5c8a [newrscfg/newrscfg01:27017]\nUsage:\n  pbm config [key] [flags]\n\nFlags:\n      --file string          Upload config from YAML file\n      --force-resync         Resync backup list with the current store\n  -h, --help                 help for config\n      --list                 List current settings\n      --set stringToString   Set the option value <key.name=value> (default [])\n  -w, --wait                 Wait for finish\n      --wait-time duration   Maximum wait time\n\nGlobal Flags:\n      --mongodb-uri string   MongoDB connection string (Default = PBM_MONGODB_URI environment variable)\n  -o, --out string           Output format <text>/<json> (default "text")\n\n')
assert 1 == 0
 +  where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f8a52c37350>, exit_status=1, command=b'pbm ... PBM_MONGODB_URI environment variable)\n  -o, --out string           Output format <text>/<json> (default "text")\n\n').rc
Raw output
start_cluster = True, cluster = <cluster.Cluster object at 0x7f8a52c55790>
newcluster = <cluster.Cluster object at 0x7f8a52b632d0>
backup_type = 'physical'

    @pytest.mark.timeout(900,func_only=True)
    @pytest.mark.parametrize('backup_type',['logical','physical'])
    def test_remap_PBM_T265(start_cluster,cluster,newcluster,backup_type):
        cluster.check_pbm_status()
        client=pymongo.MongoClient(cluster.connection)
        for i in range(600):
            client['test']['test'].insert_one({"doc":i})
    
        backup=cluster.make_backup(backup_type)
        backup = backup + ' --replset-remapping="newrs1=rs1,newrscfg=rscfg"'
        cluster.destroy()
    
        newcluster.create()
        client=pymongo.MongoClient(newcluster.connection)
        Cluster.log(client.admin.command({'transitionFromDedicatedConfigServer': 1}))
        newcluster.setup_pbm()
        result = newcluster.exec_pbm_cli("config --set storage.type=filesystem --set storage.filesystem.path=/backups --set backup.compression=none")
        assert result.rc == 0
>       newcluster.make_resync()

test_PBM-1355.py:123: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cluster.Cluster object at 0x7f8a52b632d0>

    def make_resync(self):
        n = testinfra.get_host("docker://" + self.pbm_cli)
>       result = n.check_output('pbm config --force-resync --out json')
E       AssertionError: Unexpected exit code 1 for CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f8a52c37350>, exit_status=1, command=b'pbm config --force-resync --out json', _stdout=b'', _stderr=b'Error: another operation in progress, Resync storage/677eee51b0abc0d3d61c5c8a [newrscfg/newrscfg01:27017]\nUsage:\n  pbm config [key] [flags]\n\nFlags:\n      --file string          Upload config from YAML file\n      --force-resync         Resync backup list with the current store\n  -h, --help                 help for config\n      --list                 List current settings\n      --set stringToString   Set the option value <key.name=value> (default [])\n  -w, --wait                 Wait for finish\n      --wait-time duration   Maximum wait time\n\nGlobal Flags:\n      --mongodb-uri string   MongoDB connection string (Default = PBM_MONGODB_URI environment variable)\n  -o, --out string           Output format <text>/<json> (default "text")\n\n')
E       assert 1 == 0
E        +  where 1 = CommandResult(backend=<testinfra.backend.docker.DockerBackend object at 0x7f8a52c37350>, exit_status=1, command=b'pbm ... PBM_MONGODB_URI environment variable)\n  -o, --out string           Output format <text>/<json> (default "text")\n\n').rc

cluster.py:362: AssertionError