# Stage #IF6 case sensitive stdout test

**URL:** <https://forum.codecrafters.io/t/stage-if6-case-sensitive-stdout-test/316>\
**Category:** Challenges\
**Tags:** challenge:docker\
**Created:** [May 8, 2024, 2:41pm UTC](https://forum.codecrafters.io/t/stage-if6-case-sensitive-stdout-test/316 "2024-05-08T14:41:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![harveysanders](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/harveysanders/32/279_2.png) [@harveysanders](https://forum.codecrafters.io/u/harveysanders)\
**Post date:** [May 8, 2024, 2:41pm UTC](https://forum.codecrafters.io/t/stage-if6-case-sensitive-stdout-test/316/1 "2024-05-08T14:41:00Z")

</div>

I’m stuck on stage 4 of the Docker challenge in Go.

I believe the assertion for FS isolation should be case-insensitive. I think my current stdout output should pass:

```auto
remote: [stage-4] Expected stdout to contain "No such file or directory", got: "Err: fork/exec /usr/local/bin/docker-explorer: no such file or directory"

```

However, the assertion is checking for an uppercase “N” in “No” here:

> <https://github.com/codecrafters-io/docker-tester/blob/18245703a5beed8ee0a7e1cbb7204a7ee3b3b5d1/internal/stage_fs_isolation.go#L29>

```go
if err = assertStdoutContains(result, "No such file or directory"); err != nil {
	return err
}

```

Maybe this is intentional, but it seems like a simple mistake.

Thanks for building this great tool! : )

---

<div class="post-metadata">

**Author:** ![rohitpaulk](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/rohitpaulk/32/6_2.png) [@rohitpaulk](https://forum.codecrafters.io/u/rohitpaulk)\
**Post date:** [May 8, 2024, 3:17pm UTC](https://forum.codecrafters.io/t/stage-if6-case-sensitive-stdout-test/316/2 "2024-05-08T15:17:52Z")

</div>

@harveysanders thanks for reporting!

The error here is misleading for sure, the reason here is that “no such file or directory” is an error string originating from your program, instead of from `docker-explorer ls`. If `docker-explorer ls` was successfully executed, its output would include the capital `N` when a directory isn’t found.

Definitely has to be a way to make the tester more friendly here… Maybe by testing `ls` on a known directory first before testing the invalid directory case. Will see what we can do!

---

<div class="post-metadata">

**Author:** ![harveysanders](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/harveysanders/32/279_2.png) [@harveysanders](https://forum.codecrafters.io/u/harveysanders)\
**Post date:** [May 8, 2024, 4:05pm UTC](https://forum.codecrafters.io/t/stage-if6-case-sensitive-stdout-test/316/3 "2024-05-08T16:05:27Z")

</div>

Ah thanks for the quick reply! I see what you mean now, looking at the `docker-explorer` source:

> <https://github.com/codecrafters-io/docker-explorer/blob/1d4263cb97913070484bb15a88c1a243824efc09/main.go#L80>

Maybe it would help to include the name of the executed command in the assertion? For example, on my system (`zsh` on OSX), i’d get this output with `ls`

```auto
$ ls /not-a-dir
ls: /not-a-dir: No such file or directory

```

Including the executed command and the path might give the dev just enough clues to understand their code is off. That would require an upstream change on `docker-explorer` as well though.

Anyway, thanks again for the reply and the helpful explanation!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [May 13, 2024, 4:05pm UTC](https://forum.codecrafters.io/t/stage-if6-case-sensitive-stdout-test/316/4 "2024-05-13T16:05:57Z")

</div>

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/3X/7/0/700657133935c15703e22c7c8870394f6e6dc27d.svg) [@system](https://forum.codecrafters.io/u/system)\
**Post date:** [June 4, 2024, 2:32am UTC](https://forum.codecrafters.io/t/stage-if6-case-sensitive-stdout-test/316/5 "2024-06-04T02:32:30Z")

</div>

Note: I’ve updated the title of this post to include the stage ID (#IF6). You can learn about the stages rename here: [Upcoming change: Stages overhaul](https://forum.codecrafters.io/t/upcoming-change-stages-overhaul/375).
