Beispiel #1
0
def test_list_secret_versions(capsys, secret_version, another_secret_version):
    project_id, secret_id, version_id = secret_version
    _, _, another_version_id = another_secret_version
    list_secret_versions(project_id, secret_id)

    out, _ = capsys.readouterr()
    assert secret_id in out
    assert version_id in out
    assert another_version_id in out
Beispiel #2
0
def test_list_secret_versions(capsys, secret_version, another_secret_version):
    project_id, secret_id, version_id, _ = secret_version
    version_1 = get_secret_version(project_id, secret_id, version_id)
    _, _, another_version_id, _ = another_secret_version
    version_2 = get_secret_version(project_id, secret_id, another_version_id)
    list_secret_versions(project_id, secret_id)

    out, _ = capsys.readouterr()
    assert secret_id in out
    assert "Found secret version: {}".format(version_1.name) in out
    assert "Found secret version: {}".format(version_2.name) in out