Skip to content

[Static Validation] Pester structural tests#1373

Merged
AlexanderSehr merged 6 commits intomainfrom
users/alsehr/922_pesterStructuralTests
May 12, 2022
Merged

[Static Validation] Pester structural tests#1373
AlexanderSehr merged 6 commits intomainfrom
users/alsehr/922_pesterStructuralTests

Conversation

@AlexanderSehr
Copy link
Copy Markdown
Contributor

@AlexanderSehr AlexanderSehr commented May 8, 2022

Description

  • Added tests for pipelines to the Pester test file
  • Added documentation to configure the new settings
Pipeline
Storage: StorageAccounts
AnalysisServices: Servers

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update (Wiki)

@AlexanderSehr AlexanderSehr linked an issue May 8, 2022 that may be closed by this pull request
@AlexanderSehr AlexanderSehr self-assigned this May 8, 2022
@AlexanderSehr AlexanderSehr added the [cat] testing category: testing label May 8, 2022
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 8, 2022

Unit Test Results

  1 files  1 suites   11s ⏱️
  4 tests 4 ✔️   0 💤 0
38 runs  4 ✔️ 34 💤 0

Results for commit 6081fff.

♻️ This comment has been updated with latest results.

@eriqua eriqua changed the title Users/alsehr/922 pester structural tests [Static Validation] Pester structural tests May 8, 2022
Copy link
Copy Markdown
Contributor

@eriqua eriqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd strongly suggest to avoid asking for another setting to customize. The majority of consumers, if not all, will use only one approach between ADO and GH.

What about adding the logic in the test itself, to run the ADO and/or the GH tests only if respectively the .azuredevops and/or the .github folders exist? That way we could remove the additional parameters from the settings.json and corresponding wiki instructions.

Instead, in the wiki, under the static validation, we should specify one sentence or two about the new test.

@AlexanderSehr
Copy link
Copy Markdown
Contributor Author

I'd strongly suggest to avoid asking for another setting to customize. The majority of consumers, if not all, will use only one approach between ADO and GH.

What about adding the logic in the test itself, to run the ADO and/or the GH tests only if respectively the .azuredevops and/or the .github folders exist? That way we could remove the additional parameters from the settings.json and corresponding wiki instructions.

Instead, in the wiki, under the static validation, we should specify one sentence or two about the new test.

done

@AlexanderSehr AlexanderSehr enabled auto-merge (squash) May 8, 2022 20:09
@MariusStorhaug
Copy link
Copy Markdown
Contributor

MariusStorhaug commented May 9, 2022

Looks good, though the changes added here will only run if a workflow file exists for a module, correct? The idea with the issue that triggered this PR was to add a global pipeline/workflow to check a module compliance without having to rely on pipeline/workflow files existing for a module. I encountered many times that there exist a workflow file, but no pipeline file. That use case would be covered here, just thinking that it should be independent of the module-workflow running. It could basically be a status check/validation pipeline triggering on PR if so. i.e. if the contribution matching the "desired module design".

@AlexanderSehr
Copy link
Copy Markdown
Contributor Author

AlexanderSehr commented May 10, 2022

Looks good, though the changes added here will only run if a workflow file exists for a module, correct? The idea with the issue that triggered this PR was to add a global pipeline/workflow to check a module compliance without having to rely on pipeline/workflow files existing for a module. I encountered many times that there exist a workflow file, but no pipeline file. That use case would be covered here, just thinking that it should be independent of the module-workflow running. It could basically be a status check/validation pipeline triggering on PR if so. i.e. if the contribution matching the "desired module design".

@MariusStorhaug Almost. If only checks if a Github or Azure DevOps folder exists respectively. Quite an important detail, as customers will only use one or the other

@AlexanderSehr AlexanderSehr requested a review from eriqua May 10, 2022 05:08
@AlexanderSehr AlexanderSehr requested a review from eriqua May 11, 2022 18:56
Copy link
Copy Markdown
Contributor

@eriqua eriqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗

@AlexanderSehr AlexanderSehr merged commit a3fb1ab into main May 12, 2022
@AlexanderSehr AlexanderSehr deleted the users/alsehr/922_pesterStructuralTests branch May 12, 2022 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[cat] testing category: testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests to verify module structure compliance

3 participants