Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the github asset url information #8

Closed
wants to merge 3 commits into from
Closed

Commits on Mar 10, 2024

  1. test for preserve exit status code

    the use of the status code was included in a45d2c8, but the test was missed out so rebasing
    
    tested with: cargo test
    ahornby committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    251f282 View commit details
    Browse the repository at this point in the history
  2. use a temp BUCKLE_CACHE in tests and check downloaded item

    using temp BUCKLE_CACKE stops tests taking the happy path where the user already has buck2 downloaded
    
    also check downloaded buck2 binary and prelude_hash are as expected
    
    tested with: cargo test
    ahornby committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    4f416b2 View commit details
    Browse the repository at this point in the history
  3. use the github asset url information

    Use the github asset url information so we only download things it claims to have
    
    Test Plan:
    
    cargo test
    
    local run and check the download and cache still work, notice the fetching message on first run
    
    ```
    # Download
    $ USE_BUCK2_VERSION=2023-07-15 cargo run -- --version
        Finished dev [unoptimized + debuginfo] target(s) in 0.03s
         Running `target/debug/buckle --version`
    buckle: fetching buck2-x86_64-unknown-linux-gnu.zst 2023-07-15
    buck2 22862e81827fad189f124d677c623d7ec1772cc6 <local>
    
    # see its cached
    $ USE_BUCK2_VERSION=2023-07-15 cargo run -- --version
    Sat 22 Jul 19:23:14 BST 2023
        Finished dev [unoptimized + debuginfo] target(s) in 0.04s
         Running `target/debug/buckle --version`
    buck2 22862e81827fad189f124d677c623d7ec1772cc6 <local>
    Sat 22 Jul 19:23:14 BST 2023 [Exit: 0] alex@fridge:~/loca
    ```
    ahornby committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    0c7def2 View commit details
    Browse the repository at this point in the history