bullet_train icon indicating copy to clipboard operation
bullet_train copied to clipboard

Tests for `bin/hack --link`

Open gazayas opened this issue 1 year ago • 4 comments

This is a start for addressing https://github.com/bullet-train-co/bullet_train-core/issues/510.

This doesn't cover bin/hack --link for custom paths yet, but it covers the base logic for paths pointing to local/bullet_train-core.

@jagthedrummer I'll open this one as a draft in case we want to add custom paths in this PR or edit this base test in a way that would be the most productive/beneficial for the script as a whole.

gazayas avatar Sep 04 '23 03:09 gazayas

I wanted to originally load the packages with YAML.load, but they're not being properly loaded on CI for some reason. I resorted to writing in literal strings like we do with bin/checkout-and-link-starter-repo.

gazayas avatar Sep 04 '23 03:09 gazayas

The HIDE_THINGS test is passing now, but that's mainly because I've added this conditional (CI links to path: "./core/bullet_train-core"):

if Dir.exist?("local/bullet_train-core")
  test "bin/hack --link links gems properly to local/bullet_train-core" do
    `bin/hack --link`
    ...
  end
end

All of the tests are working locally though, even when running with both CI=true and HIDE_THINGS=true.

gazayas avatar Sep 04 '23 04:09 gazayas

Didn't get around to this one today, will try to address it soon.

gazayas avatar Sep 06 '23 12:09 gazayas

No rush on this, imo, @gazayas. If there's other stuff that seems more urgent this can definitely wait.

jagthedrummer avatar Sep 06 '23 15:09 jagthedrummer