Skip to content

Commit

Permalink
Changed configs relevant to test not to reference eln.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSaleh committed Jan 3, 2023
1 parent 32b538a commit 14880d3
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 72 deletions.
7 changes: 2 additions & 5 deletions test_configs/base-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,15 @@ data:
#
# (mandatory field)
packages:
- fedora-repos-eln
- fedora-release-eln
- bash

# Labels connect things together.
# Workloads get installed in environments with the same label.
# They also get included in views with the same label.
#
# (mandatory field)
labels:
- eln
- eln-but-not-included
- eln-extras
- test

### OPTIONAL FIELDS ###

Expand Down
68 changes: 68 additions & 0 deletions test_configs/bash-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
# This configuration file defines a "Workload" in Feedback Pipeline.
# https://tiny.distro.builders
#
# Workload is a set of packages with a purpouse that someone cares about.
# They might want to monitor it for the install size, dependencies that get
# pulled in, etc.

document: feedback-pipeline-workload
version: 1
data:
# id is the filename — that automatically prevents collisions for free!


### MANDATORY FIELDS ###

# Name is an identifier for humans
#
# (mandatory field)
name: Bash

# A short description, perhaps hinting the purpose
#
# (mandatory field)
description: Bash

# Who maintains it? This is just a freeform string
# for humans to read. In Fedora, a FAS nick is recommended.
#
# (mandatory field)
maintainer: asamalik

# Packages defining this workload.
# This list includes packages for all
# architectures — that's the one to use by default.
#
# (mandatory field)
packages:
- bash

# Labels connect things together.
# Workloads get installed in environments with the same label.
# They also get included in views with the same label.
#
# (mandatory field)
labels:
- test
options:
- strict


### OPTIONAL FIELDS ###

# Architecture-specific packages.
#
# (optional field)
#arch_packages:
# x86_64:
# - arch-specific-package

# Extra installation options.
# The following are now supported:
# - "include-docs" - include documentation packages
# - "include-weak-deps" - automatically pull in "recommends" weak dependencies
#
# (optional field)
#options:
#- option
2 changes: 1 addition & 1 deletion test_configs/view-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data:
description: Test package set based on F34
maintainer: bakery
labels:
- eln
- test
repository: repo-test
buildroot_strategy: dep_tracker

Expand Down
101 changes: 35 additions & 66 deletions test_feedback_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,81 +20,50 @@ def feedback_pipeline_output():


def test_bash_test_repo_workload(feedback_pipeline_output):
expected_pkg_added_ids = set([
'filesystem-3.14-5.fc34.aarch64',
'glibc-minimal-langpack-2.33-5.fc34.aarch64',
expected_pkg_env_ids = set([
'tzdata-2021a-1.fc34.noarch',
'basesystem-11-11.fc34.noarch',
'bash-5.1.0-2.fc34.aarch64',
'ncurses-libs-6.2-4.20200222.fc34.aarch64',
'ncurses-base-6.2-4.20200222.fc34.noarch',
'fedora-gpg-keys-34-1.noarch',
'fedora-release-common-34-1.noarch',
'glibc-minimal-langpack-2.33-5.fc34.aarch64',
'libgcc-11.0.1-0.3.fc34.aarch64',
'glibc-2.33-5.fc34.aarch64',
'setup-2.13.7-3.fc34.noarch',
'glibc-common-2.33-5.fc34.aarch64'
'basesystem-11-11.fc34.noarch',
'glibc-2.33-5.fc34.aarch64',
'fedora-release-34-1.noarch',
'ncurses-base-6.2-4.20200222.fc34.noarch',
'ncurses-libs-6.2-4.20200222.fc34.aarch64',
'bash-5.1.0-2.fc34.aarch64',
'filesystem-3.14-5.fc34.aarch64',
'glibc-common-2.33-5.fc34.aarch64',
'fedora-release-identity-basic-34-1.noarch',
'fedora-repos-34-1.noarch'
])

with open(f"{feedback_pipeline_output}/workload--bash--base-test--repo-test--aarch64.json") as w:
with open(f"{feedback_pipeline_output}/workload--bash-test--base-test--repo-test--aarch64.json") as w:
workload = json.load(w)
assert set(workload["data"]["pkg_added_ids"]) == expected_pkg_added_ids
assert set(workload["data"]["pkg_env_ids"]) == expected_pkg_env_ids

def test_bash_test_repo_view(feedback_pipeline_output):
expected_pkgs = {'alternatives-1.15-2.fc34',
'basesystem-11-11.fc34',
'bash-5.1.0-2.fc34',
'ca-certificates-2020.2.41-7.fc34',
'coreutils-8.32-21.fc34',
'coreutils-common-8.32-21.fc34',
'crypto-policies-20210213-1.git5c710c0.fc34',
'fedora-gpg-keys-34-1',
'fedora-release-34-1',
'fedora-release-common-34-1',
'fedora-release-identity-basic-34-1',
'fedora-repos-34-1',
'fedora-repos-eln-34-1',
'fedora-repos-rawhide-34-1',
'filesystem-3.14-5.fc34',
'gc-8.0.4-5.fc34',
'glibc-2.33-5.fc34',
'glibc-common-2.33-5.fc34',
'glibc-minimal-langpack-2.33-5.fc34',
'gmp-1:6.2.0-6.fc34',
'grep-3.6-2.fc34',
'guile22-2.2.7-2.fc34',
'libacl-2.3.1-1.fc34',
'libattr-2.5.1-1.fc34',
'libcap-2.48-2.fc34',
'libffi-3.1-28.fc34',
'libgcc-11.0.1-0.3.fc34',
'libselinux-3.2-1.fc34',
'libsepol-3.2-1.fc34',
'libstdc++-11.0.1-0.3.fc34',
'libtasn1-4.16.0-4.fc34',
'libtool-ltdl-2.4.6-40.fc34',
'libunistring-0.9.10-10.fc34',
'libxcrypt-4.4.18-1.fc34',
'make-1:4.3-5.fc34',
'ncurses-base-6.2-4.20200222.fc34',
'ncurses-libs-6.2-4.20200222.fc34',
'openssl-libs-1:1.1.1k-1.fc34',
'p11-kit-0.23.22-3.fc34',
'p11-kit-trust-0.23.22-3.fc34',
'pcre-8.44-3.fc34.1',
'pcre2-10.36-4.fc34',
'pcre2-syntax-10.36-4.fc34',
'pizza-package-000-placeholder',
'readline-8.1-2.fc34',
'sed-4.8-7.fc34',
'setup-2.13.7-3.fc34',
'tar-2:1.34-1.fc34',
'tzdata-2021a-1.fc34',
'zlib-1.2.11-26.fc34'}
expected_pkgs = {}

with open(f"{feedback_pipeline_output}/view-packages--view-test.json") as w:
expected_pkgs = {
'fedora-gpg-keys-34-1',
'fedora-release-34-1',
'fedora-release-common-34-1',
'fedora-release-identity-basic-34-1',
'fedora-repos-34-1',
'filesystem-3.14-5.fc34',
'glibc-minimal-langpack-2.33-5.fc34',
'tzdata-2021a-1.fc34',
'basesystem-11-11.fc34',
'bash-5.1.0-2.fc34',
'ncurses-libs-6.2-4.20200222.fc34',
'ncurses-base-6.2-4.20200222.fc34',
'libgcc-11.0.1-0.3.fc34',
'glibc-2.33-5.fc34',
'setup-2.13.7-3.fc34',
'glibc-common-2.33-5.fc34'
}
view = json.load(w)
assert set(view['pkgs'].keys()) == expected_pkgs



if __name__ == "__main__":
test_mock_argv()

0 comments on commit 14880d3

Please sign in to comment.