Newman error: unknown option `--folder FOLDER_NAME' - postman

I have a problem with folder running in Newman. I run the following :
$ newman run collection_name.json --folderĀ "FOLDER_NAME" -e environment_name.json
And it returns :
error: unknown option `--folderĀ FOLDER_NAME'
I tried to write the FOLDER_NAME into brackets, with and without quotes but I have always this error message.

Related

Name a stage per build-arguments using a Dockerfile with multi-stage-builds

Is there a possibiliity to name a build-stage?
I am searching something like the following example:
ARG NAME
FROM python:3.7-alpine as modul-${NAME}
# ...
If I try this example this error occurs:
Error response from daemon: Dockerfile parse error line 5: invalid name for build stage: "modul-${NAME}", name can't start with a number or contain symbols
I also tryed to use the argument as tag (modul:${NAME}) with the same result.
You can do this with BuildKit, which requires docker 18.09+. (https://docs.docker.com/develop/develop-images/build_enhancements/)
All you have to do is set an env variable before building:
DOCKER_BUILDKIT=1 docker build -t whatever .
I don't think it's possible without BuildKit.

sbt testOnly not working

I'm trying to run a single test class in a Java Play project but fails misserably.
If I try to run
testOnly my.app.TheClassTest
from within sbt (as described in JavaTest and sbt test) I get this result:
[info] Passed: Total 0, Failed 0, Errors 0, Passed 0
[info] No tests to run for test:testOnly
My only suspicion is that the message "No tests to run for test:testOnly" does not include the name of the class I try to test.
If I try to run it from command line
sbt testOnly "my.app.TheClassTest"
It runs all the tests and then I get the following error:
[error] Expected ID character
[error] Not a valid command: net (similar: set, new, inspect)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Not a valid key: my (similar: test, name, assets)
[error] my.app.TheClassTest
I've tried all kinds of variations such as testOnly TheClassTest, test-only my.app.TheClassTest, test:testOnly etc. with only minor variations in result. Using testOnly within sbt I can write whatever I feel like and still always get the same response.
Running all tests work fine.
Is there at least a way to get a more
From sbt you can try to get the autocompletion for the command:
sbt:my-project> testOnly <tab>
When running from command line (so outside the sbt prompt), for example in continuous integration, or other scripts etc., then you take the command in quotes including the argument, like this:
sbt "testOnly my.package.TheClassTest"
Otherwise testOnly does not seem to receive the argument.
From sbt you can try to get the autocompletion for the command:
sbt:my-project> testOnly <tab>
It should display the lists of tests classes that are available. This may not work with the oldest versions of sbt.
If you see no classes, try to run test:compile before to compile your test classes.
For sbt 1.5.2, this worked:
sbt "project dbm; testOnly my.package.TestClass"

Getting 'SyntaxError: Unexpected end of JSON input' Issue when run composer-rest-server command

I deployed/updated the BNA file. I am getting below mentioned issue when running the composer-rest-server command
Command
composer-rest-server -c admin#project -n always -w true -p 3000
Issue
SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at Promise (/home/ubuntu/.nvm/versions/node/v6.11.5/lib/node_modules/composer-rest-server/server/server.js:53:32)
at module.exports (/home/ubuntu/.nvm/versions/node/v6.11.5/lib/node_modules/composer-rest-server/server/server.js:39:12)
at module.exports.promise.then (/home/ubuntu/.nvm/versions/node/v6.11.5/lib/node_modules/composer-rest-server/cli.js:124:12)
at process._tickCallback (internal/process/next_tick.js:109:7)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:383:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:496:3
result for npm ls -g --depth=0
Please give a solution to fix the issue.
Thanks in advance.

what is an error "Error: Unexpected token '}' in JSON at position 1923" in ionic 2

I am using Ionic-2 framework. When I install any native plugin in my application it throws the following error in command line.
Error: Unexpected token '}' in JSON at position 1923
I am not getting what is causing this error, now I'm unable to install any plugin.
I had a similar problem:
Error: Unexpected token / in JSON at position 1057
when I issued the command:
ionic plugin add phonegap-plugin-barcodescanner
The reason was I made a mistake by trying to comment a line of "plugins/fetch.json" by "//". Cerntainly, a json file couldn't be commented this way. However, Ionic 2 didn't tell you which file had the problem.
So, please check the json file Ionic might touch during the process, e.g. package.json & plugins/fetch.json
Make sure all the {} pair are matched.
I run into this problem when trying to execute cordova build --release android
Execute cordova plugin rm cordova-plugin-console to solve it.

How to use ssh with command containing regex?

for example, I have a directory : /full/path/to/your/dir which contains below files:
$ls /full/path/to/your/dir
/full/path/to/your/dir/test.1.log.gz
/full/path/to/your/dir/test.2.log.gz
/full/path/to/your/dir/test.3.log.gz
if I run the cmd directly on the target host, it will print result without error:
$ls /full/path/to/your/dir/test.!(3).log*
/full/path/to/your/dir/test.1.log.gz
/full/path/to/your/dir/test.2.log.gz
but if i run on another host via ssh to the target host for execution, like:
$ssh myself#hostname "ls /full/path/to/your/dir/test.!(3).log*"
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `ls /full/path/to/your/dir/test.!(3).log*'
Also, I tried with below:
$ssh myself#hostname "ls /full/path/to/your/dir/test.'!(3)'.log*"
ls: /full/path/to/your/dir/test.!(3).log*: No such file or directory
Can anyone help to tell how to correct the cmd ?
You are trying to use extended pattern matching features which must be enabled first see here and here That can be enable by shopt -s extglob
what you can do is :
ssh myself#hostname 'ls | grep -v test\.\(3\)\.log$'