小编Syl*_*ain的帖子

如何使用量角器测试字符串是否匹配

我正在将我的karma-ng-scenario测试套件迁移到量角器.我想做点什么

// karma-ng-scenario
expect(element('legend').text()).not().toBe("LOGIN_CONNECT");
Run Code Online (Sandbox Code Playgroud)

在量角器的方式.但似乎没有not()功能.

我正在使用angular-translateLONGIN_CONNECT字符串绑定到多种语言,我想测试字符串是否已翻译.

更全球化,如果有什么不同,有没有方法测试?...没有课程,页面上不存在,未选中,...

angularjs-e2e protractor

18
推荐指数
2
解决办法
3万
查看次数

docker autobuild with git private submodule

我在GitHub上有两个私有存储库叫做dashboardui.我定义ui为git子模块dashboard,并且我将docker配置为autobuild dashboard对特定分支上的每个更改.

我阅读了这篇文档https://docs.docker.com/docker-hub/builds/,但是当我尝试在我ui的设置中设置docker给出的部署密钥时,它会显示"密钥已在使用中".实际上,这个密钥已被dashboard用于允许docker自动生成此repo!

这是我的docker构建日志:

错误:

Failed to clone repository: Cloning into '/tmp/build_byaxhis7sznbvmb6wgwzm6n'...
Submodule 'app/styles/ui' (git@github.com:yllieth/ui.git) registered for path 'app/styles/ui'
Cloning into 'app/styles/ui'...


Warning: Permanently added 'github.com,192.30.252.130' (RSA) to the list of known hosts.
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
Clone of 'git@github.com:yllieth/ui.git' into submodule path 'app/styles/ui' failed
Run Code Online (Sandbox Code Playgroud)

Dockerfile:

即使我在我的仓库中定义了Docker文件,Docker也找不到任何Dockerfile dashboard.所以,我将无法给它任何指令或添加另一个SSH密钥.

如果有人知道如何使用autobuild与私人回购和git子模块,我很感兴趣!

git git-submodules docker

6
推荐指数
1
解决办法
2030
查看次数

AWS API Gateway返回403,其中包含x-amzn-ErrorType:AccessDeniedException标头

上下文

我有一个使用AWS trio构建的无服务器Web应用程序:API Gateway + Lambda + DynamoDB.应用程序的第一页发送2个http请求以获取数据并组合响应以打印结果.

            / APIGateway /projects      => Lambda (DynamoDB request)   \
web app => {                                                            } => display data
            \ APIGateway /organizations => Lambda (Github API request) /
Run Code Online (Sandbox Code Playgroud)

问题

我第一次要求页面时一切顺利.但是,如果我尝试刷新此页面,我会收到403错误/organizations请求.从那里,如果我等待~3-5分钟,我再次刷新页面,我正确地看到所有数据,我的页面完美显示.有时,GET /organizations失败,有时,它是GET /projects.

为什么我必须等待才能正确刷新页面?我该如何解决?

其他信息

当我有这个403错误时,......

  • 我收到了200 OKOPTIONS /organizations请求的回复
  • GET /organizations在cloudwatch日志中根本看不到请求(OPTIONS请求在那里,但不是GET)
  • 响应标头是:

    Connection:keep-alive
    Content-Length:60
    Content-Type:application/json
    Date:Mon, 12 Dec 2016 11:31:29 GMT
    Via:1.1 af2dd53407c5eae7ddf5c44e27a5dd1b.cloudfront.net (CloudFront)
    X-Amz-Cf-Id:Kl1JS1ZCCJuGAmydXv3qDoq3E-rFZrlZbs8Bgvw8RSrb8xsjEyAJNQ==
    x-amzn-ErrorType:AccessDeniedException …
    Run Code Online (Sandbox Code Playgroud)

amazon-web-services

4
推荐指数
1
解决办法
1万
查看次数