Isolate legacy script storage in ReportExclusionTestCase

Open Beginner friendly
#212 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
testing

Research direction

Start in netbox_scripts/tests/migration/test_plan.py and compare ReportExclusionTestCase with MigrationInventoryJobTestCase, which already uses temporary scripts storage. Apply the same setup to ReportExclusionTestCase so deploy.py and audit.py are written to temporary storage. Done when running that test module leaves no files in the configured scripts directory and the tests still pass.

Written by the indexing model from the issue text.

Description

app: scripts Bucket: KTLO status: backlog type: housekeeping
Proposed Changes

Configure ReportExclusionTestCase in netbox_scripts/tests/migration/test_plan.py to use temporary scripts storage, following the existing approach in MigrationInventoryJobTestCase.

Justification

The test case currently writes deploy.py and audit.py into NetBox's configured scripts storage without cleaning them up. This leaves files behind after the tests and can overwrite existing scripts with the same names.

Using temporary storage keeps the tests isolated and prevents unintended changes to the NetBox installation.

Dominant language
Python
Stars
8
Forks
0
Avg merge
13h 4m
Merged PRs (30d)
77

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from netbox-community/netbox-scripts

All issues in netbox-community/netbox-scripts

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.