Skip to content

Commit 72cfe84

Browse files
committed
[Test] invalid team annotation integration test
1 parent 9a118d8 commit 72cfe84

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# @team Web3
2+
3+
class Blockchain; end

tests/invalid_project_test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ fn test_validate() -> Result<(), Box<dyn Error>> {
1111
.assert()
1212
.failure()
1313
.stdout(predicate::str::contains("CODEOWNERS out of date. Run `codeownership generate` to update the CODEOWNERS file"))
14-
.stdout(predicate::str::contains("Some files are missing ownership\n- ruby/app/unowned.rb"))
14+
.stdout(predicate::str::contains("Some files are missing ownership\n- ruby/app/models/blockchain.rb\n- ruby/app/unowned.rb"))
15+
.stdout(predicate::str::contains("Found invalid team annotations\n- ruby/app/models/blockchain.rb is referencing an invalid team - 'Web3'"))
1516
.stdout(predicate::str::contains("Code ownership should only be defined for each file in one way. The following files have declared ownership in multiple ways\n- gems/payroll_calculator/calculator.rb (owner: Payments, source: team_file_mapper)\n- gems/payroll_calculator/calculator.rb (owner: Payroll, source: team_gem_mapper)"));
1617

1718
Ok(())

0 commit comments

Comments
 (0)