There were multiple alliances in Europe before the First World War. One of which was the Dual Alliance in 1879 between Germany and Austria. Which the two nations pledged to aid each other in the event of an attack by Russia. They also promised neutrality to each other if one of them was attacked by another European nation. There was also the Franco Russian Alliance, signed in 1894. It's quite a bit to go over so I suggest doing a little research on this one.