question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failures in the collection converted tests

See original GitHub issue

Collections conversion tool for linux-system-roles converts the linux-system-roles tree structure to the collection tree structure and replaces the role value with FQCN in the yaml files as well as in the modules/module_utils.

This is just a heads-up; there are 2 cases the conversion tool cannot support.

  1. direct access expecting the roles tree structure
tests/tests_unit.yml
- hosts: all
  name: execute python unit tests
  tasks:
    - name: Copy python modules
      copy:
        src: "{{ item }}"
        dest: /tmp/test-unit-1/
        local_follow: false
      loop:
        - ../library/network_connections.py
        - unit/test_network_connections.py
        - ../module_utils/network_lsr
  1. requires git repository
tests/tests_integration_pytest.yml
- name: Run Pytest tests
  hosts: all
  vars:
    - rundir: /run/system-roles-test
  tasks:
    - file:
        state: directory
        path: "{{ rundir }}"
        recurse: true

    - command: git rev-parse --show-toplevel
      register: git_top_directory
      delegate_to: localhost

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tyllcommented, Sep 16, 2020

Regarding the tree structure, I suppose the tests can be adjusted to detect whether it is a role or collection structure and import files respectively.

Yes, something like that. I’m sure the are some sort of built-in variables or env. vars. (or even path structure) that can be used to determine if the test is being run against the “old-style” role or the role as a member of a collection.

Path structure should be easy:

if ../library/network_connections.py exists:
	# assume it is a role
elif PATH_FOR_COLLECTION exists:
    # assume it is a collection
else
    # something is wrong
0reactions
tyllcommented, Sep 16, 2020

Will ELN/CentOS Stream use collections?

Not sure what you mean. What is ELN? How do ELN/CentOS Stream currently use the network role?

ELN is the project name for developing future RHEL releases as part of Fedora: https://docs.fedoraproject.org/en-US/eln/

I guess I could also ask, will Fedora Rawhide ship a collection instead of a role in the linux-system-roles package? Will it use the upstream tests to test the collection in their CI?

Read more comments on GitHub >

github_iconTop Results From Across the Web

NUnit failed to load test assembly, test doesn't run #585 - GitHub
NUnit can't find any runnable tests in the assembly, which of course is strange in your case. The adapter states this based on...
Read more >
Separating passing and failing test executions by clustering ...
We present an approach to automatically detect passing and failing executions using cluster-based anomaly detection on dynamic execution data ...
Read more >
Failed to execute goal org.apache.maven.plugins:maven ...
LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project junitcategorizer.
Read more >
12 A/B Testing Mistakes I See All the Time - CXL
Doing A/B tests without enough traffic (or conversions);; Not basing tests on a hypothesis;; Not sending test data to Google Analytics;; Wasting ...
Read more >
Unit test reports - GitLab Docs
Newly failed tests: Test cases which passed on the base branch and failed on the head branch. Newly encountered errors: Test cases which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found