Skip to content

Instantly share code, notes, and snippets.

View wei-lee's full-sized avatar

Wei Li wei-lee

  • Intercom
  • Dublin, Ireland
View GitHub Profile
[
{
"inputs": [
{
"internalType": "address",
"name": "_vault",
"type": "address"
},
{
"internalType": "address",
@wei-lee
wei-lee / output.txt
Created January 8, 2021 17:08
out put from code/run locally
go install github.com/matryer/moq
Error from server (NotFound): namespaces "redhat-rhmi-operator" not found
make: [cluster/prepare/smtp] Error 1 (ignored)
Error from server (NotFound): namespaces "redhat-rhmi-operator" not found
make: [cluster/prepare/dms] Error 1 (ignored)
Error from server (NotFound): namespaces "redhat-rhmi-operator" not found
make: [cluster/prepare/pagerduty] Error 1 (ignored)
Error from server (NotFound): serviceaccounts "rhmi-operator" not found
Already on project "redhat-rhmi-operator" on server "https://api.rlawton.6ff5.s1.devshift.org:6443".
@wei-lee
wei-lee / downtime-report.yaml
Created June 22, 2020 11:46
downtime report sample
name: Downtime Report
results:
- name: amq_serivce_broker_blackbox_downtime_seconds
query: $range - (probe_success{service='amq-service-broker'} * $range)
result:
- metric:
instance: https://console-redhat-rhmi-amq-online.apps.weili.f3s2.s1.devshift.org/oauth/healthz
job: blackbox
service: amq-service-broker
value:
@wei-lee
wei-lee / e2e_test_improvements.md
Last active June 15, 2020 08:30
e2e test improvements

First of all, we can extract the current TestCase implementation into an interface:

type Test interface {
	Test(t *testing.T, ctx *TestingContext)
}

then, we can define a few different interfaces that a test can implement to provide additional information that can be used to determine if a test should be executed:

❯ ./local.sh start
Cloning into 'jcasc'...
warning: redirecting to https://gitlab.mw.lab.eng.bos.redhat.com/jbossqe-jenkins/jcasc.git/
remote: Counting objects: 1906, done.
remote: Compressing objects: 100% (786/786), done.
remote: Total 1906 (delta 1100), reused 1849 (delta 1050)
Receiving objects: 100% (1906/1906), 594.35 KiB | 114.00 KiB/s, done.
Resolving deltas: 100% (1100/1100), done.
./local.sh: info: jcass tool cloned to jcasc
./local.sh: info: project synced to jcasc/config
{
"clientId": "aliok-rocks",
"namespace": "mobile-developer-console",
"services": [
{
"config": {
"realm": "aliok-rocks-realm",
"auth-server-url": "https://sso-user-sso.apps.mdsdemo-710a.openshiftworkshop.com/auth",
"ssl-required": "external",
"resource": "second-client",
-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'xhyve' is supported on this platform ... OK
-- Checking if xhyve driver is installed ...
Driver is available at /usr/local/bin/docker-machine-driver-xhyve
Checking for setuid bit ... OK
-- Checking the ISO URL ... OK
no way to determine mongo connection string
Warning! Could not get a mongodb connection string. Sync will not work. If running in a Dynofarm/FeedHenry MBaaS, ensure the database is upgraded
{ Error: Cannot find module './build/Release/DTraceProviderBindings'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/weili/tmp/helloworld-cloud/node_modules/fh-mbaas-express/node_modules/fh-mbaas-client/node_modules/fh-logger/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js:17:23)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
@wei-lee
wei-lee / serviceinstance.json
Last active August 3, 2018 14:03
sample data
{
"metadata": {},
"items": [
{
"metadata": {
"name": "dh-keycloak-apb-lzms6",
"generateName": "dh-keycloak-apb-",
"namespace": "myproject",
"selfLink": "/apis/servicecatalog.k8s.io/v1beta1/namespaces/myproject/serviceinstances/dh-keycloak-apb-lzms6",
"uid": "39d5f426-9579-11e8-a74d-0242ac110003",
@wei-lee
wei-lee / asb.log
Last active July 11, 2018 15:48
UPS error
[WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'
PLAY [unifiedpush-apb playbook to provision the application] *******************
TASK [ansible.kubernetes-modules : Install latest openshift client] ************
skipping: [localhost]
TASK [ansibleplaybookbundle.asb-modules : debug] *******************************
skipping: [localhost]