Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init datasource test for switch-config types #676

Open
sarcasticadmin opened this issue Mar 2, 2024 · 0 comments · May be fixed by #784
Open

init datasource test for switch-config types #676

sarcasticadmin opened this issue Mar 2, 2024 · 0 comments · May be fixed by #784

Comments

@sarcasticadmin
Copy link
Member

sarcasticadmin commented Mar 2, 2024

Description

Currently we dont have any tests that cover the configuration for types files: https://github.com/socallinuxexpo/scale-network/tree/8cb8aab0615785177693cfe06b8f0fab51756d30/switch-configuration/config/types we should be verify the number of columns and things like "Uplink", "Downlink", "AP", etc. that are specific to columns. We don't have to be ultra specific per column but covering the basics for the types.

Examples of similar tests would be something like test_switchtypes_tsv:

def test_switchtypes_tsv():
'''test switchtypes'''
meta = {
"file": "../switch-configuration/config/switchtypes",
"header": False,
"count": "9+",
"cols": [
ds.isvalidhostname,
ds.isint,
ds.isint,
ds.isvalidip,
ds.isvalidtype,
ds.isvalidhierarchy,
ds.isvalidnoiselevel,
ds.isvalidmodel,
ds.isvalidmac
]
}
result, err = ds.test_tsvfile(meta)
assert result, err

Acceptance Criteria

  • verifying the number of fields
  • verify the trunktypes (e.g. "Uplink", "Downlink", "AP", etc.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant