Skip to content

Instantly share code, notes, and snippets.

View kishansagathiya's full-sized avatar

Kishan Sagathiya kishansagathiya

View GitHub Profile
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class LoginWithGithubTest(unittest.TestCase):
# -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015 CERN.
#
# Zenodo is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015 CERN.
#
# Zenodo is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
@kishansagathiya
kishansagathiya / test_basic_tests.py
Created March 23, 2017 06:15
copy this file in tests/e2e and run 'pytest test_basic_tests.py'
# -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015 CERN.
#
# Zenodo is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
@kishansagathiya
kishansagathiya / ternimal_dump
Created March 23, 2017 06:19
dump of terminal
(zenodo1) kishan@kishan-Inspiron-3542:~/src/zenodo/tests/e2e$ pytest test_basic_tests.py
============================= test session starts ==============================
platform linux2 -- Python 2.7.12, pytest-3.0.4, py-1.4.31, pluggy-0.4.0
rootdir: /home/kishan/src/zenodo, inifile: pytest.ini
plugins: pep8-1.0.6, flask-0.10.0, cov-2.4.0
collected 2 items
test_basic_tests.py .F
---------- coverage: platform linux2, python 2.7.12-final-0 ----------
# -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2015, 2016 CERN.
#
# Zenodo is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
[ksagathi@dhcp-0-128 minishift]$ ls
LICENSE minishift README.adoc
[ksagathi@dhcp-0-128 minishift]$ ./minishift start
-- Checking if KVM driver is installed ...
Driver is available at /usr/local/bin/docker-machine-driver-kvm ... OK
-- Starting local OpenShift cluster using 'kvm' hypervisor ...
-- Starting Minishift VM ... OK
-- Checking for IP address ... OK
-- Checking if external host is reachable from the Minishift VM ...
Pinging 8.8.8.8 ... FAIL
`06:00:08,022 ERROR [io.undertow.request] (default task-20) UT005023: Exception handling request to /auth/admin/realms: org.jboss.resteasy.spi.UnhandledException: org.keycloak.component.ComponentValidationException: Failed to decode private key
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:168)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:411)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispat
package bootstrap
import (
"bytes"
"encoding/base64"
"fmt"
"net/http"
"strings"
yaml "gopkg.in/yaml.v2"
package bootstrap
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
)
// KeycloakConfig contains basic configuration data for Keycloak