mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-31 09:01:23 -07:00
Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified (#6075)
Consolidate onepassword unit tests so that ansible-test will find them when the plugin is modified.
This commit is contained in:
parent
b72b7d4936
commit
de1f0ff419
18 changed files with 89 additions and 106 deletions
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"uuid": "0123456789",
|
||||
"vaultUuid": "2468",
|
||||
"overview": {
|
||||
"title": "Mock \"Quot'd\" Server"
|
||||
},
|
||||
"details": {
|
||||
"sections": [{
|
||||
"title": "",
|
||||
"fields": [
|
||||
{"t": "username", "v": "jamesbond"},
|
||||
{"t": "password", "v": "t0pS3cret"},
|
||||
{"t": "notes", "v": "Test note with\nmultiple lines and trailing space.\n\n"},
|
||||
{"t": "tricksy \"quot'd\" field\\", "v": "\"quot'd\" value"}
|
||||
]
|
||||
}]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022, Ansible Project
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"uuid": "9876543210",
|
||||
"vaultUuid": "1357",
|
||||
"overview": {
|
||||
"title": "Mock Website",
|
||||
"URLs": [
|
||||
{"l": "website", "u": "https://acme.com/login"}
|
||||
]
|
||||
},
|
||||
"details": {
|
||||
"sections": [{
|
||||
"title": "",
|
||||
"fields": [
|
||||
{"t": "password", "v": "t0pS3cret"}
|
||||
]
|
||||
}]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022, Ansible Project
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"uuid": "864201357",
|
||||
"vaultUuid": "1357",
|
||||
"overview": {
|
||||
"title": "Mock Something"
|
||||
},
|
||||
"details": {
|
||||
"fields": [
|
||||
{
|
||||
"value": "jbond@mi6.gov.uk",
|
||||
"name": "emailAddress"
|
||||
},
|
||||
{
|
||||
"name": "password",
|
||||
"value": "vauxhall"
|
||||
},
|
||||
{}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022, Ansible Project
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"id": "ywvdbojsguzgrgnokmcxtydgdv",
|
||||
"title": "Authy Backup",
|
||||
"version": 1,
|
||||
"vault": {
|
||||
"id": "bcqxysvcnejjrwzoqrwzcqjqxc",
|
||||
"name": "test vault"
|
||||
},
|
||||
"category": "PASSWORD",
|
||||
"last_edited_by": "7FUPZ8ZNE02KSHMAIMKHIVUE17",
|
||||
"created_at": "2015-01-18T13:13:38Z",
|
||||
"updated_at": "2016-02-20T16:23:54Z",
|
||||
"additional_information": "Jan 18, 2015, 08:13:38",
|
||||
"fields": [
|
||||
{
|
||||
"id": "password",
|
||||
"type": "CONCEALED",
|
||||
"purpose": "PASSWORD",
|
||||
"label": "password",
|
||||
"value": "OctoberPoppyNuttyDraperySabbath",
|
||||
"reference": "op://Test Vault/Authy Backup/password",
|
||||
"password_details": {
|
||||
"strength": "FANTASTIC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "notesPlain",
|
||||
"type": "STRING",
|
||||
"purpose": "NOTES",
|
||||
"label": "notesPlain",
|
||||
"value": "Backup password to restore Authy",
|
||||
"reference": "op://Test Vault/Authy Backup/notesPlain"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022, Ansible Project
|
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
"id": "awk4s2u44fhnrgppszcsvc663i",
|
||||
"title": "Dummy Login",
|
||||
"version": 4,
|
||||
"vault": {
|
||||
"id": "stpebbaccrq72xulgouxsk4p7y",
|
||||
"name": "Personal"
|
||||
},
|
||||
"category": "LOGIN",
|
||||
"last_edited_by": "LSGPJERUYBH7BFPHMZ2KKGL6AU",
|
||||
"created_at": "2018-04-25T21:55:19Z",
|
||||
"updated_at": "2022-09-02T17:51:21Z",
|
||||
"additional_information": "agent.smith",
|
||||
"urls": [
|
||||
{
|
||||
"primary": true,
|
||||
"href": "https://acme.com"
|
||||
}
|
||||
],
|
||||
"sections": [
|
||||
{
|
||||
"id": "add more"
|
||||
},
|
||||
{
|
||||
"id": "gafaeg7vnqmgrklw5r6yrufyxy",
|
||||
"label": "COMMANDS"
|
||||
},
|
||||
{
|
||||
"id": "linked items",
|
||||
"label": "Related Items"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"id": "username",
|
||||
"type": "STRING",
|
||||
"purpose": "USERNAME",
|
||||
"label": "username",
|
||||
"value": "agent.smith",
|
||||
"reference": "op://Personal/Dummy Login/username"
|
||||
},
|
||||
{
|
||||
"id": "password",
|
||||
"type": "CONCEALED",
|
||||
"purpose": "PASSWORD",
|
||||
"label": "password",
|
||||
"value": "FootworkDegreeReverence",
|
||||
"entropy": 159.60836791992188,
|
||||
"reference": "op://Personal/Dummy Login/password",
|
||||
"password_details": {
|
||||
"entropy": 159,
|
||||
"generated": true,
|
||||
"strength": "FANTASTIC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "notesPlain",
|
||||
"type": "STRING",
|
||||
"purpose": "NOTES",
|
||||
"label": "notesPlain",
|
||||
"reference": "op://Personal/Dummy Login/notesPlain"
|
||||
},
|
||||
{
|
||||
"id": "7gyjekelk24ghgd4rvafspjbli",
|
||||
"section": {
|
||||
"id": "add more"
|
||||
},
|
||||
"type": "STRING",
|
||||
"label": "title",
|
||||
"value": "value of the field",
|
||||
"reference": "op://Personal/Dummy Login/add more/title"
|
||||
},
|
||||
{
|
||||
"id": "fx4wpzokrxn7tlb3uwpdjfptgm",
|
||||
"section": {
|
||||
"id": "gafaeg7vnqmgrklw5r6yrufyxy",
|
||||
"label": "COMMANDS"
|
||||
},
|
||||
"type": "CONCEALED",
|
||||
"label": "password1",
|
||||
"value": "data in custom field",
|
||||
"reference": "op://Personal/Dummy Login/COMMANDS/password1"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022, Ansible Project
|
103
tests/unit/plugins/lookup/onepassword_fixtures/v2_out_03.json
Normal file
103
tests/unit/plugins/lookup/onepassword_fixtures/v2_out_03.json
Normal file
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"id": "7t7qu2r35qyvqj3crujd4dqxmy",
|
||||
"title": "Duplicate Sections",
|
||||
"version": 3,
|
||||
"vault": {
|
||||
"id": "stpebbaccrq72xulgouxsk4p7y",
|
||||
"name": "Personal"
|
||||
},
|
||||
"category": "LOGIN",
|
||||
"last_edited_by": "LSGPJERUYBH7BFPHMZ2KKGL6AU",
|
||||
"created_at": "2022-11-04T17:09:18Z",
|
||||
"updated_at": "2022-11-04T17:22:19Z",
|
||||
"additional_information": "flora",
|
||||
"urls": [
|
||||
{
|
||||
"label": "website",
|
||||
"primary": true,
|
||||
"href": "https://acme.com/login"
|
||||
}
|
||||
],
|
||||
"sections": [
|
||||
{
|
||||
"id": "add more"
|
||||
},
|
||||
{
|
||||
"id": "7osqcvd43i75teocdzbb6d7mie",
|
||||
"label": "Section 2"
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"id": "username",
|
||||
"type": "STRING",
|
||||
"purpose": "USERNAME",
|
||||
"label": "username",
|
||||
"value": "flora",
|
||||
"reference": "op://Personal/Duplicate Sections/username"
|
||||
},
|
||||
{
|
||||
"id": "password",
|
||||
"type": "CONCEALED",
|
||||
"purpose": "PASSWORD",
|
||||
"label": "password",
|
||||
"value": "PtZGFLAibx-erTo7ywywEvh-n4syas97n-tuF2D.b8DdqA2vCjrvRGkNQxj!Gi9R",
|
||||
"entropy": 379.564697265625,
|
||||
"reference": "op://Personal/Duplicate Sections/password",
|
||||
"password_details": {
|
||||
"entropy": 379,
|
||||
"generated": true,
|
||||
"strength": "FANTASTIC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "notesPlain",
|
||||
"type": "STRING",
|
||||
"purpose": "NOTES",
|
||||
"label": "notesPlain",
|
||||
"reference": "op://Personal/Duplicate Sections/notesPlain"
|
||||
},
|
||||
{
|
||||
"id": "4saaazkb7arwisj6ysctb4jmm4",
|
||||
"section": {
|
||||
"id": "add more"
|
||||
},
|
||||
"type": "STRING",
|
||||
"label": "text",
|
||||
"value": "text field the first",
|
||||
"reference": "op://Personal/Duplicate Sections/add more/text"
|
||||
},
|
||||
{
|
||||
"id": "4vtfkj4bwcmg7d5uf62wnpkp3a",
|
||||
"section": {
|
||||
"id": "add more"
|
||||
},
|
||||
"type": "STRING",
|
||||
"label": "text",
|
||||
"value": "text field the second",
|
||||
"reference": "op://Personal/Duplicate Sections/add more/text"
|
||||
},
|
||||
{
|
||||
"id": "wbrjnowkrgavpooomtht36gjqu",
|
||||
"section": {
|
||||
"id": "7osqcvd43i75teocdzbb6d7mie",
|
||||
"label": "Section 2"
|
||||
},
|
||||
"type": "STRING",
|
||||
"label": "s2 text",
|
||||
"value": "first value",
|
||||
"reference": "op://Personal/Duplicate Sections/Section 2/s2 text"
|
||||
},
|
||||
{
|
||||
"id": "bddlz2fj2pebmtfhksbmcexy7m",
|
||||
"section": {
|
||||
"id": "7osqcvd43i75teocdzbb6d7mie",
|
||||
"label": "Section 2"
|
||||
},
|
||||
"type": "STRING",
|
||||
"label": "s2 text",
|
||||
"value": "second value",
|
||||
"reference": "op://Personal/Duplicate Sections/Section 2/s2 text"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2022, Ansible Project
|
Loading…
Add table
Add a link
Reference in a new issue