Skip to content

Conversation

@teogeb
Copy link
Contributor

@teogeb teogeb commented Nov 25, 2024

Fixed config wizard storage path assertions to be compatible with Mac OS. In the assertion we compare the real path to a symbolic link in Mac OS and thererore the test fails.

Change

Now compares normalized paths, i.e. uses realpathSync which resolves symbolic links.

Error

    expect(received).toInclude(expected)

    Expected string to include:
      "streamr-node /var/folders/_1/sztmfs_j15zg4t29k2nql0040000gn/T/test-config-wizardhSM4Wz/config.json
    "
    Received:
      "Welcome to the Streamr Network!
        This Config Wizard will help you setup your node.·····
        The steps are documented here:
        https://docs.streamr.network/guides/how-to-run-streamr-node#config-wizard
    ✓ Congratulations, you've setup your Streamr node!
        Your node address is 0x909DC59FF7A3b23126bc6F86ad44dD808fd424Dc
        Your node's generated name is Mountain Until Gun
    You can start your Streamr node now with
        streamr-node /var/folders/1/sztmfsj15zg4t29k2nql0040000gn/T/test-config-wizardhSM4Wz/config.json·····
        For environment specific run instructions, see
        https://docs.streamr.network/guides/how-to-run-streamr-node"

      158 |         expect(summary).toInclude(`generated name is Mountain Until Gun\n`)
      159 |
    > 160 |         expect(summary).toInclude(`streamr-node ${storagePath}\n`)
          |                         ^
      161 |     })
      162 |
      163 |     it('prints out the generated private key onto the screen if told to', async () => {

      at Object.<anonymous> (test/unit/ConfigWizard.test.ts:160:25)

@github-actions github-actions bot added the node label Nov 25, 2024
@teogeb teogeb requested a review from mondoreale November 25, 2024 09:14
Copy link
Contributor

@mondoreale mondoreale left a comment

Choose a reason for hiding this comment

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

Interesting. 🤔

I like it.

See my comments.

@mondoreale
Copy link
Contributor

Let's get this one out asap.

@teogeb teogeb requested a review from mondoreale December 4, 2024 09:15
@teogeb teogeb merged commit eb6de91 into main Dec 9, 2024
23 checks passed
@teogeb teogeb deleted the fix-config-wizard-storagePath-tests branch December 9, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants