Try to add LANG=en_US to the test

-- 
  Michele Sciabarra
  mich...@sciabarra.com

----- Original message -----
From: "d4rkstar (via GitHub)" <g...@apache.org>
To: dev@openserverless.apache.org
Subject: [I] [CLI] update_branch test fails when system lang is not "english" 
[openserverless]
Date: Wednesday, August 21, 2024 6:27 PM


d4rkstar opened a new issue, #45:
URL: https://github.com/apache/openserverless/issues/45

   Hello,
   the test update_branch fails on my Ubuntu machine with Italian language.
   
   ```bash
   ❯ lsb_release -a
   No LSB modules are available.
   Distributor ID:      Ubuntu
   Description: Ubuntu 22.04.4 LTS
   Release:     22.04
   Codename:    jammy
   ```
   
   When i run the test i receive an error caused by the fact that git messages 
are in italian:
   
   ```bash
   ❯ task itest T=update_branch
   task: Task "bats" is up to date
   task: [itest] rm -Rf ~/.ops/olaris
   task: [itest] if test -z "update_branch"
   then bats/bin/bats  .
   else bats/bin/bats  update_branch.bats
   fi
   
   update_branch.bats
    ✗ ops -update on olaris with old commit updates correctly
      (from function `assert_line' in file 
test_helper/bats-assert/src/assert_line.bash, line 232,
       in test file update_branch.bats, line 32)
        `assert_line --partial "Your branch is behind"' failed
      Cloning tasks...
      Enumerating objects: 3661, done.
   Counting objects: 100% (289/289), done.
   Compressing objects: 100% (110/110), done.
      Total 3661 (delta 164), reused 271 (delta 158), pack-reused 3372 (from 1)
      Tasks downloaded successfully
      ensuring prerequisite kubectl 1.30.3
      ensuring prerequisite kind 0.17.0
      ensuring prerequisite k3sup 0.13.6
      ensuring prerequisite coreutils 0.0.27
      ensuring prerequisite bun 1.1.21
      ensuring prerequisite 7zz 2407
      ensuring prerequisite rg 14.1.0
      OPS & OPS_CMD: /home/bruno/.local/bin/ops
      OPS_VERSION: 0.1.0-2408111626.dev
      OPS_BRANCH: 0.1.0
      OPS_BIN: /home/bruno/.ops/linux-amd64/bin
      OPS_TMP: /home/bruno/.ops/tmp
      OPS_HOME: /home/bruno/.ops
      OPS_ROOT: /home/bruno/.ops/0.1.0/olaris
      OPS_REPO: http://github.com/apache/openserverless-task
      OPS_PWD: /home/bruno/.ops/0.1.0/olaris
      OPS_OLARIS: fc5ef7db11a1cc6b952e2ea40e7c1d738c93c09c
      OPS_ROOT_PLUGIN: /home/bruno/.ops/0.1.0/olaris
   
      -- no output line contains substring --
      substring : Your branch is behind
      output (5 lines):
        Sul branch 0.1.0
        Il tuo branch, rispetto a 'origin/0.1.0', è indietro di 1 commit e ne 
posso eseguire il fast forward.
          (usa "git pull" per aggiornare il tuo branch locale)
   
        non c'è nulla di cui eseguire il commit, l'albero di lavoro è pulito
      --
   
   
   1 test, 1 failure
   
   task: Failed to run task "itest": exit status 1
   ```
   
   The test is ok if i export LANG* to en_US:
   
   ```bash
   ❯ export LANG=en_US.UTF-8
   ❯ export LANGUAGE=en_US.UTF-8
   ❯ export LC_ALL=en_US.UTF-8
   ❯ task itest T=update_branch
   task: Task "bats" is up to date
   task: [itest] rm -Rf ~/.ops/olaris
   task: [itest] if test -z "update_branch"
   then bats/bin/bats  .
   else bats/bin/bats  update_branch.bats
   fi
   
   update_branch.bats
    ✓ ops -update on olaris with old commit updates correctly
   
   1 test, 0 failures
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@openserverless.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to