Skip to content

Commit cb04888

Browse files
committed
Fix PRN scenarios tests
1 parent 7268fe8 commit cb04888

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pytest_fixtures/component/pulp.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,15 @@ def _setup_prn_content(sat, manifest, test_name=None):
130130
docker_repository,
131131
ac_repository,
132132
]
133-
cv = sat.api.ContentView(organization=org, repository=repos).create()
134-
lce = sat.api.LifecycleEnvironment(organization=org).create()
133+
cv = sat.api.ContentView(organization=org, repository=repos, name=gen_string('alpha')).create()
134+
library = (
135+
sat.api.LifecycleEnvironment()
136+
.search(query={'search': f'name={constants.ENVIRONMENT} and organization_id={org.id}'})[0]
137+
.read()
138+
)
139+
lce = sat.api.LifecycleEnvironment(
140+
organization=org, prior=library.id, name=gen_string('alpha')
141+
).create()
135142

136143
cv.publish()
137144
cvv = cv.read().version[0].read()

0 commit comments

Comments
 (0)