Skip to content

Update failing ValidatorTest in 'Java CI with Maven' GitHub workflow #602

@kwwall

Description

@kwwall

I tracked the failurein the CI workflow build down to line 375 (after merging PR #591) to
src/test/java/org/owasp/esapi/reference/ValidatorTest.java

That line in that file that is failing is:
assertTrue(instance.isValidDirectoryPath("test7", "/bin", parent, false, errors)); // Always exist directory

The GitHub workflow environment for this is using 'Ubuntu-latest' and is currently running under Ubuntu 20.04.2.

As far as I know, going back to the earliest days of POSIX, there ALWAYS used to be an actual '/bin' directory on EVERY POSIX compliant OS under the root file system. Apparently, the key words here being 'used to be'.

It is happening because for the OS environment for this workflow, we are using 'Ubuntu-latest' and when GitHub updated Ubuntu to use Ubuntu 20.04, then '/bin' became a sym link to 'usr/bin', thus breaking our test.

The fix is to use '/dev' instead. We can't use '/etc' (the other logical candidate) because under MacOS, '/etc' is a sym link to 'private/etc' so that would fail if tested under MacOS.

I have a fix already ready for this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions