Yes, all of WW2 they were opposing each other. Just because they split Poland doesn't mean they weren't enemies, it was nothing more than opportunism.
While Hitler was busy carving up Poland, he was planning the entire time for how to bring Russia to its knees. At no point did he plan for anything but eventual confrontation with Russia.
If I give you a ride home today, while plotting your demise for tomorrow, we're not pals.
That's hindsight. They were allies. They signed a pact, and they traded. True Hitler was plotting to invade Russia, but from the Russian perspective Germany was not the enemy.
While Hitler was busy carving up Poland, he was planning the entire time for how to bring Russia to its knees. At no point did he plan for anything but eventual confrontation with Russia.
If I give you a ride home today, while plotting your demise for tomorrow, we're not pals.