Saturday, November 3, 2018

Promise

var promise1 = new Promise(function(resolve, reject) {
  setTimeout(function() {
    console.log("I am resolving"); 
    resolve('foo');
  }, 300);
  console.log("Just inited me, not yet resolved");
});
var pro2 = Promise.resolve().then((val) => {
  console.log("Calling promise");
  return promise1.then(function(val1) {
    console.log("Promise was resolved and returned value");
    return val1 ;
  });
});
pro2.then((val) => {
  console.log(val);
});

Note: the then will be called right after the resolve is invoked

Saturday, June 9, 2018

Docker CICD

Full testing project with Docker and CICD

https://github.com/lapth/test_docker_cicd

Friday, June 8, 2018

Java Jacoco Code coverage Powermock Mockito

Java Jacoco Powermock Mockito Maven JDK 1.8 Tested

https://github.com/lapth/powermock-examples-maven/tree/master/jacoco-offline

Java Jacoco Powermock Mockito Ant JDK 1.8 Tested

https://github.com/lapth/jacoco/tree/master/org.jacoco.examples.ant

https://github.com/lapth/jacoco/tree/master/org.jacoco.examples.ant.test

Wednesday, April 18, 2018

Redhat 7 - create new REPO from ISO

1) su -

2) cd /
3) mkdir /cdrom
4) mount /dev/sr0 /cdrom
=> mkae sure the RHEL 7.5 iso is in cdrom 0

5) cd /etc/yum.repos.d/
6) mv redhat.repo redhat.repo_bk
7) vi dvd.repo

[dvd-source]
name=RHEL 7.5
baseurl=file://cdrom
enabled=1
gpgcheck=0


8) yum repolist
=> should see the RHEL 7.5 now